DecoderOutputBuffer


@UnstableApi
public abstract class DecoderOutputBuffer extends 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

public interface DecoderOutputBuffer.Owner<S extends DecoderOutputBuffer>

Buffer owner.

Public fields

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

Public methods

void

Clears the buffer.

abstract void

Releases the output buffer for reuse.

Inherited methods

From androidx.media3.decoder.Buffer
final void

Adds the flag to this buffer's flags.

final void

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

final boolean

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

final boolean

Returns whether the BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA flag is set.

final boolean

Returns whether the BUFFER_FLAG_END_OF_STREAM flag is set.

final boolean

Returns whether the BUFFER_FLAG_FIRST_SAMPLE flag is set.

final boolean

Returns whether the BUFFER_FLAG_KEY_FRAME flag is set.

final boolean

Returns whether the BUFFER_FLAG_LAST_SAMPLE flag is set.

final boolean

Returns whether the BUFFER_FLAG_NOT_DEPENDED_ON flag is set.

final void
setFlags(@C.BufferFlags int flags)

Replaces this buffer's flags with flags.

Public fields

shouldBeSkipped

public boolean shouldBeSkipped

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

skippedOutputBufferCount

public int skippedOutputBufferCount

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

timeUs

public long timeUs

The presentation timestamp for the buffer, in microseconds.

Public constructors

DecoderOutputBuffer

public DecoderOutputBuffer()

Public methods

clear

@CallSuper
public void clear()

Clears the buffer.

release

public abstract void release()

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