DefaultSsChunkSource.Factory


class DefaultSsChunkSource.Factory : SsChunkSource.Factory


Summary

Public constructors

Factory(dataSourceFactory: DataSource.Factory!)

Public functions

SsChunkSource!
createChunkSource(
    manifestLoaderErrorThrower: LoaderErrorThrower!,
    manifest: SsManifest!,
    streamElementIndex: Int,
    trackSelection: ExoTrackSelection!,
    transferListener: TransferListener?,
    cmcdConfiguration: CmcdConfiguration?
)

Creates a new SsChunkSource.

DefaultSsChunkSource.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}.

DefaultSsChunkSource.Factory!

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

Public constructors

Factory

Factory(dataSourceFactory: DataSource.Factory!)

Public functions

createChunkSource

fun createChunkSource(
    manifestLoaderErrorThrower: LoaderErrorThrower!,
    manifest: SsManifest!,
    streamElementIndex: Int,
    trackSelection: ExoTrackSelection!,
    transferListener: TransferListener?,
    cmcdConfiguration: CmcdConfiguration?
): SsChunkSource!

Creates a new SsChunkSource.

Parameters
manifestLoaderErrorThrower: LoaderErrorThrower!

Throws errors affecting loading of manifests.

manifest: SsManifest!

The initial manifest.

streamElementIndex: Int

The index of the corresponding stream element in the manifest.

trackSelection: ExoTrackSelection!

The track selection.

transferListener: TransferListener?

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

cmcdConfiguration: CmcdConfiguration?

The CmcdConfiguration for this chunk source.

Returns
SsChunkSource!

The created SsChunkSource.

experimentalParseSubtitlesDuringExtraction

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

setSubtitleParserFactory

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

This factory, for convenience.