SubtitleTranscodingExtractorOutput


@UnstableApi
class SubtitleTranscodingExtractorOutput : ExtractorOutput


A wrapping ExtractorOutput that transcodes text samples from supported subtitle formats to APPLICATION_MEDIA3_CUES.

The resulting APPLICATION_MEDIA3_CUES samples are emitted to the underlying TrackOutput.

For non-text tracks (i.e. where C.TrackType is not C.TRACK_TYPE_TEXT), samples are passed through to the underlying TrackOutput without modification.

Support for subtitle formats is determined by supportsFormat on the SubtitleParser.Factory passed to the constructor of this class.

Summary

Public constructors

SubtitleTranscodingExtractorOutput(
    delegate: ExtractorOutput!,
    subtitleParserFactory: SubtitleParser.Factory!
)

Public functions

Unit

Called when all tracks have been identified, meaning no new trackId values will be passed to track.

Unit
Unit
seekMap(seekMap: SeekMap!)

Called when a SeekMap has been extracted from the stream.

TrackOutput!
track(id: Int, @C.TrackType type: Int)

Called by the Extractor to get the TrackOutput for a specific track.

Inherited Constants

From androidx.media3.extractor.ExtractorOutput
const ExtractorOutput!

Placeholder ExtractorOutput implementation throwing an in each method.

Public constructors

SubtitleTranscodingExtractorOutput

SubtitleTranscodingExtractorOutput(
    delegate: ExtractorOutput!,
    subtitleParserFactory: SubtitleParser.Factory!
)

Public functions

endTracks

fun endTracks(): Unit

Called when all tracks have been identified, meaning no new trackId values will be passed to track.

resetSubtitleParsers

fun resetSubtitleParsers(): Unit

seekMap

fun seekMap(seekMap: SeekMap!): Unit

Called when a SeekMap has been extracted from the stream.

Parameters
seekMap: SeekMap!

The extracted SeekMap.

track

fun track(id: Int, @C.TrackType type: Int): TrackOutput!

Called by the Extractor to get the TrackOutput for a specific track.

The same TrackOutput is returned if multiple calls are made with the same id.

Parameters
id: Int

A track identifier.

@C.TrackType type: Int

The track type.

Returns
TrackOutput!

The TrackOutput for the given track identifier.