SubtitleDecoder


@UnstableApi
interface SubtitleDecoder : 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 functions

Unit
setPositionUs(positionUs: Long)

Informs the decoder of the current playback position.

Inherited functions

From androidx.media3.decoder.Decoder
I?

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

O?

Dequeues the next output buffer from the decoder.

Unit

Flushes the decoder.

String!

Returns the name of the decoder.

Unit
queueInputBuffer(inputBuffer: I!)

Queues an input buffer to the decoder.

Unit

Releases the decoder.

Unit
setOutputStartTimeUs(outputStartTimeUs: Long)

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

Public functions

setPositionUs

fun setPositionUs(positionUs: Long): Unit

Informs the decoder of the current playback position.

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

Parameters
positionUs: Long

The current playback position in microseconds.