Interface VideoFrame
-
- All Implemented Interfaces:
public interface VideoFrameInterface for representing video frame. Check color format by using VideoFrame.colorFormat. Most used format is ImageFormat.YUV_420_888 which is I420 format that uses planar or semi-planar (but not fully interleaved) memory layout - do not assume continuity and use use VideoFrame.yuvPlanes and VideoFrame.yuvStrides APIs to get correct start line of any plane. NB: do not assume that ByteBuffers of VideoFrame.yuvPlanes are backed by Java's byte[] arrays! Most probably frame you receive via this API is natively allocated and NOT backed by Java array. Use slow but secure ByteBuffer.put or better, your own native C++ processing via JNI.
-
-
Method Summary
Modifier and Type Method Description abstract IntegergetWidth()The frame width. abstract IntegergetHeight()The frame height. abstract IntArraygetYuvStrides()The frame strides for each plane. abstract Array<ByteBuffer>getYuvPlanes()The Y, U and V planes array. abstract IntegergetColorFormat()Color format of YUV frame as in android.graphics.ImageFormat. abstract IntegergetRotation()The degree that the frame must be rotated clockwise to be rendered correctly. -
-
Method Detail
-
getYuvStrides
abstract IntArray getYuvStrides()
The frame strides for each plane.
-
getYuvPlanes
abstract Array<ByteBuffer> getYuvPlanes()
The Y, U and V planes array.
-
getColorFormat
abstract Integer getColorFormat()
Color format of YUV frame as in android.graphics.ImageFormat.
-
getRotation
abstract Integer getRotation()
The degree that the frame must be rotated clockwise to be rendered correctly.
-
-
-
-