VideoDataBuffer describes a single frame of video.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | PACKED_FORMAT_PLANE
Plane index used by all packed formats |
| public static final int | YCBCR_PLANE_ALPHA
Plane index for YCbCr alpha data, this plane is optional |
| public static final int | YCBCR_PLANE_CB
Plane index for YCbCr blue chrominance data |
| public static final int | YCBCR_PLANE_CR
Plane index for YCbCr red chrominance data |
| public static final int | YCBCR_PLANE_LUMA
Plane index for YCbCr luminance data |
| Modifier and Type | Method and Description |
|---|---|
| public VideoDataBuffer | Returns: new buffer containing a converted copy of the source video imagethe video format to convert to newFormat)Converts the video image to the specified format. |
| public ByteBuffer | Returns: theByteBuffer containing video data for the specified
plane or null for non-existent or invalid planesThe numeric index of the plane plane)Retrieve the data buffer for the specified plane. |
| public int | Returns: the number of rows in the imageGets the height of the image as created by the decoder, this may be larger than the display height. |
| public int | Returns: the number of pixels per row in the imageGets the width of the image as created by the decoder, this may be larger than the display width. |
| public VideoFormat | |
| public int | |
| public int | Returns: the number of planes this video buffer contains, or 1 for non-planar formats
|
| public int[] | |
| public int | Returns: Number of bytes that comprises a single row of pixels in the specified plane. Will return zero if the plane is not in use.The numeric index of the plane. planeIndex)Returns the number of bytes in each row of pixels for the specified plane. |
| public double | |
| public int | |
| public boolean | Returns: true if an alpha channel is presentDetermine if a video buffer has an alpha channel. |
| public void | holdFrame()
Place a hold on a buffer so that it cannot be reused by the buffer pool from whence it came. |
| public void | |
| public void | setDirty()
Flags a video buffer indicating the contents of the buffer have been updated and any cached representations need to be updated. |
| PACKED_FORMAT_PLANE | back to summary |
|---|---|
| public static final int PACKED_FORMAT_PLANE Plane index used by all packed formats | |
| YCBCR_PLANE_ALPHA | back to summary |
|---|---|
| public static final int YCBCR_PLANE_ALPHA Plane index for YCbCr alpha data, this plane is optional | |
| YCBCR_PLANE_CB | back to summary |
|---|---|
| public static final int YCBCR_PLANE_CB Plane index for YCbCr blue chrominance data | |
| YCBCR_PLANE_CR | back to summary |
|---|---|
| public static final int YCBCR_PLANE_CR Plane index for YCbCr red chrominance data | |
| YCBCR_PLANE_LUMA | back to summary |
|---|---|
| public static final int YCBCR_PLANE_LUMA Plane index for YCbCr luminance data | |
| convertToFormat | back to summary |
|---|---|
| public VideoDataBuffer convertToFormat(VideoFormat newFormat) Converts the video image to the specified format. You can only convert TO
either
| |
| getBufferForPlane | back to summary |
|---|---|
| public ByteBuffer getBufferForPlane(int plane) Retrieve the data buffer for the specified plane. For chunky formats,
pass
| |
| getEncodedHeight | back to summary |
|---|---|
| public int getEncodedHeight() Gets the height of the image as created by the decoder, this may be larger than the display height.
| |
| getEncodedWidth | back to summary |
|---|---|
| public int getEncodedWidth() Gets the width of the image as created by the decoder, this may be larger than the display width.
| |
| getFormat | back to summary |
|---|---|
public VideoFormat getFormat()
| |
| getHeight | back to summary |
|---|---|
| public int getHeight() Gets the height of the VideoDataBuffer
| |
| getPlaneCount | back to summary |
|---|---|
public int getPlaneCount()
| |
| getPlaneStrides | back to summary |
|---|---|
public int[] getPlaneStrides()
| |
| getStrideForPlane | back to summary |
|---|---|
| public int getStrideForPlane(int planeIndex) Returns the number of bytes in each row of pixels for the specified plane.
| |
| getTimestamp | back to summary |
|---|---|
| public double getTimestamp() Retrieve the timestamp of the buffer.
| |
| getWidth | back to summary |
|---|---|
| public int getWidth() Gets the width of the VideoDataBuffer
| |
| hasAlpha | back to summary |
|---|---|
| public boolean hasAlpha() Determine if a video buffer has an alpha channel. This merely determines if the buffer itself has an alpha channel, not if there is any transparency to the image.
| |
| holdFrame | back to summary |
|---|---|
| public void holdFrame() Place a hold on a buffer so that it cannot be reused by the buffer pool from whence it came. Holding a buffer too long may cause additional buffers to be allocated which will increase memory usage, so one should take care to release a frame as soon as possible. | |
| releaseFrame | back to summary |
|---|---|
| public void releaseFrame() Releases a hold previously placed on this frame. When the hold count reaches zero then the frame will be disposed or reused, thus preventing memory allocation overhead. | |
| setDirty | back to summary |
|---|---|
| public void setDirty() Flags a video buffer indicating the contents of the buffer have been updated and any cached representations need to be updated. | |