VideoDecoderOutputBuffer
@UnstableApi
class VideoDecoderOutputBuffer : DecoderOutputBuffer
kotlin.Any | |||
↳ | androidx.media3.decoder.Buffer | ||
↳ | androidx.media3.decoder.DecoderOutputBuffer | ||
↳ | androidx.media3.decoder.VideoDecoderOutputBuffer |
Video decoder output buffer containing video frame data.
Summary
Constants |
|
---|---|
const Int |
|
const Int |
COLORSPACE_BT601 = 1 |
const Int |
COLORSPACE_BT709 = 2 |
const Int |
Public constructors |
---|
Creates VideoDecoderOutputBuffer. |
Public functions |
|
---|---|
Unit |
init( Initializes the buffer. |
Boolean |
|
Unit |
initForPrivateFrame(width: Int, height: Int) Configures the buffer for the given frame dimensions when passing actual frame data via |
Boolean |
Resizes the buffer based on the given stride. |
Unit |
release() Releases the output buffer for reuse. |
Public properties |
|
---|---|
Int |
|
ByteBuffer? |
RGB buffer for RGB mode. |
Long |
Decoder private data. |
Format? |
The format of the input from which this output buffer was decoded. |
Int |
|
Int |
Output mode. |
ByteBuffer? |
Supplemental data related to the output frame, if |
Int |
|
Int |
|
Int |
|
Array<ByteBuffer!>? |
YUV planes for YUV mode. |
IntArray<Int>? |
Inherited functions |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
Inherited properties |
---|
Constants
Public constructors
VideoDecoderOutputBuffer
VideoDecoderOutputBuffer(
owner: DecoderOutputBuffer.Owner<VideoDecoderOutputBuffer!>!
)
Creates VideoDecoderOutputBuffer.
Parameters | |
---|---|
owner: DecoderOutputBuffer.Owner<VideoDecoderOutputBuffer!>! |
Buffer owner. |
Public functions
init
fun init(
timeUs: Long,
@C.VideoOutputMode mode: Int,
supplementalData: ByteBuffer?
): Unit
Initializes the buffer.
Parameters | |
---|---|
timeUs: Long |
The presentation timestamp for the buffer, in microseconds. |
@C.VideoOutputMode mode: Int |
The output mode. One of |
supplementalData: ByteBuffer? |
Supplemental data associated with the frame, or |
initForOffsetFrames
fun initForOffsetFrames(
offset: Int,
width: Int,
height: Int,
yStride: Int,
uvStride: Int,
colorspace: Int,
alignedHeight: Int
): Boolean
initForPrivateFrame
fun initForPrivateFrame(width: Int, height: Int): Unit
Configures the buffer for the given frame dimensions when passing actual frame data via decoderPrivate
. Called via JNI after decoding completes.
Public properties
supplementalData
val supplementalData: ByteBuffer?
Supplemental data related to the output frame, if hasSupplementalData
returns true. If present, the buffer is populated with supplemental data from position 0 to its limit.