public class NV21Buffer extends java.lang.Object implements VideoFrame.Buffer
构造器和说明 |
---|
NV21Buffer(byte[] data,
int width,
int height,
java.lang.Runnable releaseCallback) |
限定符和类型 | 方法和说明 |
---|---|
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|.
|
byte[] |
getData() |
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
在接口中 VideoFrame.Buffer
public int getHeight()
getHeight
在接口中 VideoFrame.Buffer
public byte[] getData()
public VideoFrame.I420Buffer toI420()
VideoFrame.Buffer
toI420
在接口中 VideoFrame.Buffer
public void retain()
RefCounted
retain
在接口中 RefCounted
retain
在接口中 VideoFrame.Buffer
public void release()
RefCounted
release
在接口中 RefCounted
release
在接口中 VideoFrame.Buffer
public VideoFrame.Buffer cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)
VideoFrame.Buffer
cropAndScale
在接口中 VideoFrame.Buffer