public class JavaI420Buffer extends java.lang.Object implements VideoFrame.I420Buffer
限定符和类型 | 方法和说明 |
---|---|
static JavaI420Buffer |
allocate(int width,
int height)
Allocates an empty I420Buffer suitable for an image of the given dimensions.
|
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|.
|
java.nio.ByteBuffer |
getDataU()
Returns a direct ByteBuffer containing U-plane data.
|
java.nio.ByteBuffer |
getDataV()
Returns a direct ByteBuffer containing V-plane data.
|
java.nio.ByteBuffer |
getDataY()
Returns a direct ByteBuffer containing Y-plane data.
|
int |
getHeight() |
int |
getStrideU() |
int |
getStrideV() |
int |
getStrideY() |
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.
|
static JavaI420Buffer |
wrap(int width,
int height,
java.nio.ByteBuffer dataY,
int strideY,
java.nio.ByteBuffer dataU,
int strideU,
java.nio.ByteBuffer dataV,
int strideV,
java.lang.Runnable releaseCallback)
Wraps existing ByteBuffers into JavaI420Buffer object without copying the contents.
|
public static JavaI420Buffer wrap(int width, int height, java.nio.ByteBuffer dataY, int strideY, java.nio.ByteBuffer dataU, int strideU, java.nio.ByteBuffer dataV, int strideV, java.lang.Runnable releaseCallback)
public static JavaI420Buffer allocate(int width, int height)
public int getWidth()
VideoFrame.Buffer
getWidth
在接口中 VideoFrame.Buffer
public int getHeight()
getHeight
在接口中 VideoFrame.Buffer
public java.nio.ByteBuffer getDataY()
VideoFrame.I420Buffer
getDataY
在接口中 VideoFrame.I420Buffer
public java.nio.ByteBuffer getDataU()
VideoFrame.I420Buffer
getDataU
在接口中 VideoFrame.I420Buffer
public java.nio.ByteBuffer getDataV()
VideoFrame.I420Buffer
getDataV
在接口中 VideoFrame.I420Buffer
public int getStrideY()
getStrideY
在接口中 VideoFrame.I420Buffer
public int getStrideU()
getStrideU
在接口中 VideoFrame.I420Buffer
public int getStrideV()
getStrideV
在接口中 VideoFrame.I420Buffer
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