public final class BaseVideoRenderer.Frame
extends java.lang.Object
getBuffer()
method to get
the frame data. The data is in I420 format.BaseVideoRenderer.onFrame(Frame)
Modifier and Type | Field and Description |
---|---|
protected java.nio.ByteBuffer |
buffer |
protected int |
format |
protected int |
height |
protected long |
internalBuffer |
protected byte[] |
metadata |
protected boolean |
mirrored |
protected int |
uvStride |
protected int |
width |
protected int |
yStride |
Modifier | Constructor and Description |
---|---|
protected |
Frame() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Free all resources associated to this frame.
|
protected void |
finalize() |
java.nio.ByteBuffer |
getBuffer()
Returns the byte buffer containing the video frame data, which is in I420 format.
|
int |
getHeight()
Returns the height of the video frame, in pixels.
|
byte[] |
getMetadata()
Returns the metadata associated with the frame if any, as a byte array.
|
int |
getUvStride() |
int |
getWidth()
Returns the width of the video frame, in pixels.
|
int |
getYstride() |
boolean |
isMirroredX()
Whether the video frame is mirrored about the x-axis (
true )
or not (false ). |
void |
recycle()
Deprecated.
If you want to free the memory of a frame you can just set the reference to null and wait the GC to collect it
|
protected long internalBuffer
protected java.nio.ByteBuffer buffer
protected int format
protected int width
protected int height
protected boolean mirrored
protected int yStride
protected int uvStride
protected byte[] metadata
@Deprecated public void recycle()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void destroy()
public java.nio.ByteBuffer getBuffer()
public int getWidth()
public int getHeight()
public boolean isMirroredX()
true
)
or not (false
).public int getYstride()
public int getUvStride()
public byte[] getMetadata()