SimpleDecoderOutputBuffer


@UnstableApi
class SimpleDecoderOutputBuffer : DecoderOutputBuffer


Buffer for SimpleDecoder output.

Summary

Public functions

Unit

Clears the buffer.

ByteBuffer!
grow(newSize: Int)

Grows the buffer to a new size.

ByteBuffer!
init(timeUs: Long, size: Int)

Initializes the buffer.

Unit

Releases the output buffer for reuse.

Public properties

ByteBuffer?

Inherited functions

From androidx.media3.decoder.Buffer
Unit

Adds the flag to this buffer's flags.

Unit

Removes the flag from this buffer's flags, if it is set.

Boolean

Returns whether the specified flag has been set on this buffer.

Boolean

Returns whether the BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA flag is set.

Boolean

Returns whether the BUFFER_FLAG_END_OF_STREAM flag is set.

Boolean

Returns whether the BUFFER_FLAG_FIRST_SAMPLE flag is set.

Boolean

Returns whether the BUFFER_FLAG_KEY_FRAME flag is set.

Boolean

Returns whether the BUFFER_FLAG_LAST_SAMPLE flag is set.

Boolean

Returns whether the BUFFER_FLAG_NOT_DEPENDED_ON flag is set.

Unit

Replaces this buffer's flags with flags.

Inherited properties

From androidx.media3.decoder.DecoderOutputBuffer
Boolean

Whether this buffer should be skipped, usually because the decoding process generated no data or invalid data.

Int

The number of buffers immediately prior to this one that were skipped in the Decoder.

Long

The presentation timestamp for the buffer, in microseconds.

Public constructors

SimpleDecoderOutputBuffer

SimpleDecoderOutputBuffer(
    owner: DecoderOutputBuffer.Owner<SimpleDecoderOutputBuffer!>!
)

Public functions

clear

fun clear(): Unit

Clears the buffer.

grow

fun grow(newSize: Int): ByteBuffer!

Grows the buffer to a new size.

Existing data is copied to the new buffer, and position is preserved.

Parameters
newSize: Int

New size of the buffer.

Returns
ByteBuffer!

The data buffer, for convenience.

init

fun init(timeUs: Long, size: Int): ByteBuffer!

Initializes the buffer.

Parameters
timeUs: Long

The presentation timestamp for the buffer, in microseconds.

size: Int

An upper bound on the size of the data that will be written to the buffer.

Returns
ByteBuffer!

The data buffer, for convenience.

release

fun release(): Unit

Releases the output buffer for reuse. Must be called when the buffer is no longer needed.

Public properties

data

val dataByteBuffer?