DecoderOutputBuffer


@UnstableApi
abstract class DecoderOutputBuffer : Buffer

Known direct subclasses
ImageOutputBuffer

Output buffer for ImageDecoder instances.

SimpleDecoderOutputBuffer

Buffer for SimpleDecoder output.

SubtitleOutputBuffer

Base class for SubtitleDecoder output buffers.

VideoDecoderOutputBuffer

Video decoder output buffer containing video frame data.


Output buffer decoded by a Decoder.

Summary

Nested types

Buffer owner.

Public constructors

Public functions

Unit

Clears the buffer.

abstract Unit

Releases the output buffer for reuse.

Public properties

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.

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.

Public constructors

DecoderOutputBuffer

DecoderOutputBuffer()

Public functions

clear

@CallSuper
fun clear(): Unit

Clears the buffer.

release

abstract fun release(): Unit

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

Public properties

shouldBeSkipped

val shouldBeSkippedBoolean

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

skippedOutputBufferCount

val skippedOutputBufferCountInt

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

timeUs

val timeUsLong

The presentation timestamp for the buffer, in microseconds.