SubtitleDecoder


@UnstableApi
public interface SubtitleDecoder extends Decoder

Known direct subclasses
Cea608Decoder

A SubtitleDecoder for CEA-608 (also known as "line 21 captions" and "EIA-608").

Cea708Decoder

A SubtitleDecoder for CEA-708 (also known as "EIA-708").

SimpleSubtitleDecoder

Base class for subtitle parsers that use their own decode thread.


Decodes Subtitles from SubtitleInputBuffers.

Summary

Public methods

abstract void
setPositionUs(long positionUs)

Informs the decoder of the current playback position.

Inherited methods

From androidx.media3.decoder.Decoder
abstract @Nullable I

Dequeues the next input buffer to be filled and queued to the decoder.

abstract @Nullable O

Dequeues the next output buffer from the decoder.

abstract void

Flushes the decoder.

abstract String

Returns the name of the decoder.

abstract void
queueInputBuffer(I inputBuffer)

Queues an input buffer to the decoder.

abstract void

Releases the decoder.

abstract void
setOutputStartTimeUs(long outputStartTimeUs)

Sets the timestamp from which output buffers should be produced, in microseconds.

Public methods

setPositionUs

abstract void setPositionUs(long positionUs)

Informs the decoder of the current playback position.

Must be called prior to each attempt to dequeue output buffers from the decoder.

Parameters
long positionUs

The current playback position in microseconds.