| Modifier and Type | Method and Description |
|---|---|
| public MediaFrame | Returns: valid MediaFrame in the specified format, or null if it cannot be convertedThe new video pixel format, if the same format is specified then
the same frame will be returned. If a conversion is unsupported then this
will return null. The converted frame must be released when you're done
with it by calling fmt)releaseFrame or it will leak.Converts the video frame to a different video format. |
| public ByteBuffer | Returns: theByteBuffer for the specified plane or null for
non-existent planesthe numeric index of the plane, for chunky formats pass zero plane)
|
| public int | |
| public int | |
| public int | |
| public PixelFormat | |
| public int | |
| public void | |
| public int | |
| public int[] | Returns: int array containing the line stride for each planeThe plane line stride is the number of bytes between two consecutive lines in the buffer. |
| public void | releaseFrame()
When you're finished with a video frame, call this to allow the media subsystem to deallocate or recycle the frame immediately. |
| public int | Returns: the line stride for the specified planewhich plane to get the stride for, valid range is zero
to planeIndex)planeCount() non-inclusiveThe plane line stride is the number of bytes between two consecutive lines in the buffer. |
| convertToFormat | back to summary |
|---|---|
| public MediaFrame convertToFormat(PixelFormat fmt) Converts the video frame to a different video format.
| |
| getBufferForPlane | back to summary |
|---|---|
public ByteBuffer getBufferForPlane(int plane)
| |
| getEncodedHeight | back to summary |
|---|---|
public int getEncodedHeight()
| |
| getEncodedWidth | back to summary |
|---|---|
public int getEncodedWidth()
| |
| getHeight | back to summary |
|---|---|
public int getHeight()
| |
| getPixelFormat | back to summary |
|---|---|
public PixelFormat getPixelFormat()
| |
| getWidth | back to summary |
|---|---|
public int getWidth()
| |
| holdFrame | back to summary |
|---|---|
| public void holdFrame() This method will prevent the frame from being deallocated or recycled. It is very important to balance the use of this method by calling releaseFrame when you're done with it otherwise the memory occupied by the frame will never be released which could lead to out of memory conditions. | |
| planeCount | back to summary |
|---|---|
public int planeCount()
| |
| planeStrides | back to summary |
|---|---|
| public int[] planeStrides() The plane line stride is the number of bytes between two consecutive
lines in the buffer. This number will vary depending on the frame's
| |
| releaseFrame | back to summary |
|---|---|
| public void releaseFrame() When you're finished with a video frame, call this to allow the media subsystem to deallocate or recycle the frame immediately. | |
| strideForPlane | back to summary |
|---|---|
| public int strideForPlane(int planeIndex) The plane line stride is the number of bytes between two consecutive
lines in the buffer. This number will vary depending on the frame's
| |