public class Rgba8888Buffer extends java.lang.Object implements VideoFrame.Buffer
Constructor and Description |
---|
Rgba8888Buffer(java.nio.ByteBuffer data,
int width,
int height) |
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|.
|
java.nio.ByteBuffer |
getData()
Returns the raw frame buffer data.
|
int |
getHeight()
Returns the frame height.
|
int |
getWidth()
Returns the frame width.
|
void |
release()
Decreases ref count by one.
|
void |
retain()
Increases ref count by one.
|
VideoFrame.I420Buffer |
toI420()
Converts the buffer to a
VideoFrame.I420Buffer . |
public Rgba8888Buffer(@NonNull java.nio.ByteBuffer data, int width, int height)
public java.nio.ByteBuffer getData()
public int getWidth()
getWidth
in interface VideoFrame.Buffer
public int getHeight()
getHeight
in interface VideoFrame.Buffer
public VideoFrame.I420Buffer toI420()
VideoFrame.I420Buffer
.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
7.0.0