public static interface VideoFrame.Buffer extends RefCounted
Reference counting is needed since a video buffer can be shared between multiple VideoSinks, and the buffer needs to be returned to the VideoSource as soon as all references are gone.
| Modifier and Type | Method and Description |
|---|---|
VideoFrame.Buffer |
cropAndScale(int cropX,
int cropY,
int cropWidth,
int cropHeight,
int scaleWidth,
int scaleHeight)
Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|.
|
int |
getHeight() |
int |
getWidth()
Resolution of the buffer in pixels.
|
void |
release()
Decreases ref count by one.
|
void |
retain()
Increases ref count by one.
|
VideoFrame.I420Buffer |
toI420()
Returns a memory-backed frame in I420 format.
|
int getWidth()
int getHeight()
VideoFrame.I420Buffer toI420()
void retain()
RefCountedretain in interface RefCountedvoid release()
RefCountedrelease in interface RefCountedVideoFrame.Buffer cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)