public class NV21Buffer extends java.lang.Object implements VideoFrame.Buffer
Constructor and Description |
---|
NV21Buffer(byte[] data,
int width,
int height,
java.lang.Runnable releaseCallback) |
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.
|
public NV21Buffer(byte[] data, int width, int height, @Nullable java.lang.Runnable releaseCallback)
public int getWidth()
VideoFrame.Buffer
getWidth
in interface VideoFrame.Buffer
public int getHeight()
getHeight
in interface VideoFrame.Buffer
public VideoFrame.I420Buffer toI420()
VideoFrame.Buffer
toI420
in interface VideoFrame.Buffer
public void retain()
RefCounted
retain
in interface RefCounted
retain
in interface VideoFrame.Buffer
public void release()
RefCounted
release
in interface RefCounted
release
in interface VideoFrame.Buffer
public VideoFrame.Buffer cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)
VideoFrame.Buffer
cropAndScale
in interface VideoFrame.Buffer
6.4.1