DashChunkSource.Factory


interface DashChunkSource.Factory


Factory for DashChunkSources.

Summary

Public functions

DashChunkSource!
createDashChunkSource(
    manifestLoaderErrorThrower: LoaderErrorThrower!,
    manifest: DashManifest!,
    baseUrlExclusionList: BaseUrlExclusionList!,
    periodIndex: Int,
    adaptationSetIndices: IntArray!,
    trackSelection: ExoTrackSelection!,
    @C.TrackType trackType: Int,
    elapsedRealtimeOffsetMs: Long,
    enableEventMessageTrack: Boolean,
    closedCaptionFormats: (Mutable)List<Format!>!,
    playerEmsgHandler: PlayerEmsgHandler.PlayerTrackEmsgHandler?,
    transferListener: TransferListener?,
    playerId: PlayerId!,
    cmcdConfiguration: CmcdConfiguration?
)
DashChunkSource.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).

Format!
getOutputTextFormat(sourceFormat: Format!)

Returns the output Format of emitted text samples which were originally in sourceFormat.

DashChunkSource.Factory!

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

Public functions

createDashChunkSource

fun createDashChunkSource(
    manifestLoaderErrorThrower: LoaderErrorThrower!,
    manifest: DashManifest!,
    baseUrlExclusionList: BaseUrlExclusionList!,
    periodIndex: Int,
    adaptationSetIndices: IntArray!,
    trackSelection: ExoTrackSelection!,
    @C.TrackType trackType: Int,
    elapsedRealtimeOffsetMs: Long,
    enableEventMessageTrack: Boolean,
    closedCaptionFormats: (Mutable)List<Format!>!,
    playerEmsgHandler: PlayerEmsgHandler.PlayerTrackEmsgHandler?,
    transferListener: TransferListener?,
    playerId: PlayerId!,
    cmcdConfiguration: CmcdConfiguration?
): DashChunkSource!
Parameters
manifestLoaderErrorThrower: LoaderErrorThrower!

Throws errors affecting loading of manifests.

manifest: DashManifest!

The initial manifest.

baseUrlExclusionList: BaseUrlExclusionList!

The base URL exclusion list.

periodIndex: Int

The index of the corresponding period in the manifest.

adaptationSetIndices: IntArray!

The indices of the corresponding adaptation sets in the period.

trackSelection: ExoTrackSelection!

The track selection.

@C.TrackType trackType: Int

The track type.

elapsedRealtimeOffsetMs: Long

If known, an estimate of the instantaneous difference between server-side unix time and elapsedRealtime in milliseconds, specified as the server's unix time minus the local elapsed time. Or TIME_UNSET if unknown.

enableEventMessageTrack: Boolean

Whether to output an event message track.

closedCaptionFormats: (Mutable)List<Format!>!

The Formats of closed caption tracks to be output.

playerEmsgHandler: PlayerEmsgHandler.PlayerTrackEmsgHandler?

The track output to write emsg messages to, or null if emsgs shouldn't be written.

transferListener: TransferListener?

The transfer listener which should be informed of any data transfers. May be null if no listener is available.

playerId: PlayerId!

The PlayerId of the player using this chunk source.

cmcdConfiguration: CmcdConfiguration?

The CmcdConfiguration for this chunk source.

Returns
DashChunkSource!

The created DashChunkSource.

experimentalParseSubtitlesDuringExtraction

@CanIgnoreReturnValue
fun experimentalParseSubtitlesDuringExtraction(
    parseSubtitlesDuringExtraction: Boolean
): DashChunkSource.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
DashChunkSource.Factory!

This factory, for convenience.

getOutputTextFormat

fun getOutputTextFormat(sourceFormat: Format!): Format!

Returns the output Format of emitted text samples which were originally in sourceFormat.

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

Non-text source formats are always returned without mutation.

Parameters
sourceFormat: Format!

The original text-based format.

Returns
Format!

The Format that will be associated with a text track.

setSubtitleParserFactory

@CanIgnoreReturnValue
fun setSubtitleParserFactory(subtitleParserFactory: SubtitleParser.Factory!): DashChunkSource.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
DashChunkSource.Factory!

This factory, for convenience.