public interface

DashChunkSource.Factory

 androidx.media3.exoplayer.dash.DashChunkSource.Factory

Subclasses:

DefaultDashChunkSource.Factory

Overview

Factory for DashChunkSources.

Summary

Methods
public DashChunkSourcecreateDashChunkSource(LoaderErrorThrower manifestLoaderErrorThrower, DashManifest manifest, BaseUrlExclusionList baseUrlExclusionList, int periodIndex, int[] adaptationSetIndices[], ExoTrackSelection trackSelection, int trackType, long elapsedRealtimeOffsetMs, boolean enableEventMessageTrack, java.util.List<Format> closedCaptionFormats, PlayerEmsgHandler.PlayerTrackEmsgHandler playerEmsgHandler, TransferListener transferListener, PlayerId playerId, CmcdConfiguration cmcdConfiguration)

public DashChunkSource.FactoryexperimentalParseSubtitlesDuringExtraction(boolean parseSubtitlesDuringExtraction)

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).

public FormatgetOutputTextFormat(Format sourceFormat)

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

public DashChunkSource.FactorysetSubtitleParserFactory(SubtitleParser.Factory subtitleParserFactory)

Sets the to use for parsing subtitles during extraction.

Methods

public DashChunkSource.Factory setSubtitleParserFactory(SubtitleParser.Factory subtitleParserFactory)

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

Parameters:

subtitleParserFactory: The for parsing subtitles during extraction.

Returns:

This factory, for convenience.

public DashChunkSource.Factory experimentalParseSubtitlesDuringExtraction(boolean parseSubtitlesDuringExtraction)

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: Whether to parse subtitles during extraction or rendering.

Returns:

This factory, for convenience.

public DashChunkSource createDashChunkSource(LoaderErrorThrower manifestLoaderErrorThrower, DashManifest manifest, BaseUrlExclusionList baseUrlExclusionList, int periodIndex, int[] adaptationSetIndices[], ExoTrackSelection trackSelection, int trackType, long elapsedRealtimeOffsetMs, boolean enableEventMessageTrack, java.util.List<Format> closedCaptionFormats, PlayerEmsgHandler.PlayerTrackEmsgHandler playerEmsgHandler, TransferListener transferListener, PlayerId playerId, CmcdConfiguration cmcdConfiguration)

Parameters:

manifestLoaderErrorThrower: Throws errors affecting loading of manifests.
manifest: The initial manifest.
baseUrlExclusionList: The base URL exclusion list.
periodIndex: The index of the corresponding period in the manifest.
adaptationSetIndices: The indices of the corresponding adaptation sets in the period.
trackSelection: The track selection.
trackType: The .
elapsedRealtimeOffsetMs: If known, an estimate of the instantaneous difference between server-side unix time and in milliseconds, specified as the server's unix time minus the local elapsed time. Or C.TIME_UNSET if unknown.
enableEventMessageTrack: Whether to output an event message track.
closedCaptionFormats: The Formats of closed caption tracks to be output.
playerEmsgHandler: The track output to write emsg messages to, or null if emsgs shouldn't be written.
transferListener: The transfer listener which should be informed of any data transfers. May be null if no listener is available.
playerId: The PlayerId of the player using this chunk source.
cmcdConfiguration: The CmcdConfiguration for this chunk source.

Returns:

The created DashChunkSource.

public Format getOutputTextFormat(Format sourceFormat)

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

Parameters:

sourceFormat: The original text-based format.

Returns:

The Format that will be associated with a text track.