BundledChunkExtractor.Factory


class BundledChunkExtractor.Factory : ChunkExtractor.Factory


ChunkExtractor.Factory for BundledChunkExtractor.

Summary

Public constructors

Public functions

ChunkExtractor?
createProgressiveMediaExtractor(
    @C.TrackType primaryTrackType: Int,
    representationFormat: Format!,
    enableEventMessageTrack: Boolean,
    closedCaptionFormats: (Mutable)List<Format!>!,
    playerEmsgTrackOutput: TrackOutput?,
    playerId: PlayerId!
)

Returns a new ChunkExtractor instance.

BundledChunkExtractor.Factory!

Sets whether subtitles should be parsed as part of extraction (before being added to the sample queue) or as part of rendering (when being taken from the sample queue).

BundledChunkExtractor.Factory!

Sets whether within GOP sample dependency information should be parsed as part of extraction.

Format!
getOutputTextFormat(sourceFormat: Format!)

Returns the output of emitted C#TRACK_TYPE_TEXT text samples which were originally in sourceFormat}.

BundledChunkExtractor.Factory!

Sets the SubtitleParser.Factory to use for parsing subtitles during extraction.

Public constructors

Factory

Factory()

Public functions

createProgressiveMediaExtractor

fun createProgressiveMediaExtractor(
    @C.TrackType primaryTrackType: Int,
    representationFormat: Format!,
    enableEventMessageTrack: Boolean,
    closedCaptionFormats: (Mutable)List<Format!>!,
    playerEmsgTrackOutput: TrackOutput?,
    playerId: PlayerId!
): ChunkExtractor?

Returns a new ChunkExtractor instance.

Parameters
@C.TrackType primaryTrackType: Int

The type of the primary track.

representationFormat: Format!

The format of the representation to extract from.

enableEventMessageTrack: Boolean

Whether to enable the event message track.

closedCaptionFormats: (Mutable)List<Format!>!

The Formats of the Closed-Caption tracks.

playerEmsgTrackOutput: TrackOutput?

The TrackOutput for extracted EMSG messages, or null.

playerId: PlayerId!

The PlayerId of the player using this chunk extractor.

Returns
ChunkExtractor?

A new ChunkExtractor instance, or null if not applicable.

experimentalParseSubtitlesDuringExtraction

@CanIgnoreReturnValue
fun experimentalParseSubtitlesDuringExtraction(
    parseSubtitlesDuringExtraction: Boolean
): BundledChunkExtractor.Factory!

Sets whether subtitles should be parsed as part of extraction (before being added to the sample queue) or as part of rendering (when being taken from the sample queue). Defaults to false (i.e. subtitles will be parsed as part of rendering).

This method is experimental and will be renamed or removed in a future release.

Parameters
parseSubtitlesDuringExtraction: Boolean

Whether to parse subtitles during extraction or rendering.

Returns
BundledChunkExtractor.Factory!

This factory, for convenience.

experimentalParseWithinGopSampleDependencies

@CanIgnoreReturnValue
fun experimentalParseWithinGopSampleDependencies(
    parseWithinGopSampleDependencies: Boolean
): BundledChunkExtractor.Factory!

Sets whether within GOP sample dependency information should be parsed as part of extraction. Defaults to false.

Having access to additional sample dependency information can speed up seeking. See FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES.

This method is experimental and will be renamed or removed in a future release.

Parameters
parseWithinGopSampleDependencies: Boolean

Whether to parse within GOP sample dependencies during extraction.

Returns
BundledChunkExtractor.Factory!

This factory, for convenience.

getOutputTextFormat

fun getOutputTextFormat(sourceFormat: Format!): Format!

Returns the output of emitted C#TRACK_TYPE_TEXT text samples which were originally in sourceFormat}.

In many cases, where an emits samples from the source without mutation, this method simply returns sourceFormat}. In other cases, such as an that transcodes subtitles from the sourceFormat} to * MimeTypes#APPLICATION_MEDIA3_CUES, the format is updated to indicate the transcoding that is taking place.

Non-text source formats are always returned without mutation.

This implementation performs transcoding of the original format to APPLICATION_MEDIA3_CUES if it is supported by SubtitleParser.Factory.

To modify the support behavior, you can set your own subtitle parser factory.

setSubtitleParserFactory

@CanIgnoreReturnValue
fun setSubtitleParserFactory(subtitleParserFactory: SubtitleParser.Factory!): BundledChunkExtractor.Factory!

Sets the SubtitleParser.Factory to use for parsing subtitles during extraction. The default factory value is implementation dependent.

Parameters
subtitleParserFactory: SubtitleParser.Factory!

The SubtitleParser.Factory for parsing subtitles during extraction.

Returns
BundledChunkExtractor.Factory!

This factory, for convenience.