DefaultDashChunkSource.Factory


class DefaultDashChunkSource.Factory : DashChunkSource.Factory


DashChunkSource.Factory for DefaultDashChunkSource instances.

Summary

Public constructors

Factory(dataSourceFactory: DataSource.Factory!)

Equivalent to new Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad = 1).

Factory(dataSourceFactory: DataSource.Factory!, maxSegmentsPerLoad: Int)

Equivalent to new Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad).

Factory(
    chunkExtractorFactory: ChunkExtractor.Factory!,
    dataSourceFactory: DataSource.Factory!,
    maxSegmentsPerLoad: Int
)

Creates a new instance.

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?
)
DefaultDashChunkSource.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 of emitted C#TRACK_TYPE_TEXT text samples which were originally in sourceFormat}.

DefaultDashChunkSource.Factory!

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

Public constructors

Factory

Factory(dataSourceFactory: DataSource.Factory!, maxSegmentsPerLoad: Int)

Equivalent to new Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad).

Factory

Factory(
    chunkExtractorFactory: ChunkExtractor.Factory!,
    dataSourceFactory: DataSource.Factory!,
    maxSegmentsPerLoad: Int
)

Creates a new instance.

Parameters
chunkExtractorFactory: ChunkExtractor.Factory!

Creates ChunkExtractor instances to use for extracting chunks.

dataSourceFactory: DataSource.Factory!

Creates the DataSource to use for downloading chunks.

maxSegmentsPerLoad: Int

See DefaultDashChunkSource.

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
): DefaultDashChunkSource.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
DefaultDashChunkSource.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 delegates determining of the output format to the passed to the constructor of this class.

setSubtitleParserFactory

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

This factory, for convenience.