DashChunkSource.Factory
public interface DashChunkSource.Factory
Factory for DashChunkSources.
Summary
Public methods |
|
|---|---|
abstract DashChunkSource |
createDashChunkSource( |
default DashChunkSource.Factory |
@CanIgnoreReturnValueSets 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). |
default DashChunkSource.Factory |
@CanIgnoreReturnValueSets the set of video codecs for which within GOP sample dependency information should be parsed as part of extraction. |
default Format |
getOutputTextFormat(Format sourceFormat)Returns the output |
default DashChunkSource.Factory |
@CanIgnoreReturnValueSets the |
Public methods
createDashChunkSource
abstract DashChunkSource createDashChunkSource(
LoaderErrorThrower manifestLoaderErrorThrower,
DashManifest manifest,
BaseUrlExclusionList baseUrlExclusionList,
int periodIndex,
int[] adaptationSetIndices,
ExoTrackSelection trackSelection,
@C.TrackType int trackType,
long elapsedRealtimeOffsetMs,
boolean enableEventMessageTrack,
List<Format> closedCaptionFormats,
@Nullable PlayerEmsgHandler.PlayerTrackEmsgHandler playerEmsgHandler,
@Nullable TransferListener transferListener,
PlayerId playerId,
@Nullable CmcdConfiguration cmcdConfiguration
)
| Parameters | |
|---|---|
LoaderErrorThrower manifestLoaderErrorThrower |
Throws errors affecting loading of manifests. |
DashManifest manifest |
The initial manifest. |
BaseUrlExclusionList baseUrlExclusionList |
The base URL exclusion list. |
int periodIndex |
The index of the corresponding period in the manifest. |
int[] adaptationSetIndices |
The indices of the corresponding adaptation sets in the period. |
ExoTrackSelection trackSelection |
The track selection. |
@C.TrackType int trackType |
The |
long elapsedRealtimeOffsetMs |
If known, an estimate of the instantaneous difference between server-side unix time and |
boolean enableEventMessageTrack |
Whether to output an event message track. |
List<Format> closedCaptionFormats |
The |
@Nullable PlayerEmsgHandler.PlayerTrackEmsgHandler playerEmsgHandler |
The track output to write emsg messages to, or null if emsgs shouldn't be written. |
@Nullable TransferListener transferListener |
The transfer listener which should be informed of any data transfers. May be null if no listener is available. |
PlayerId playerId |
The |
@Nullable CmcdConfiguration cmcdConfiguration |
The |
| Returns | |
|---|---|
DashChunkSource |
The created |
experimentalParseSubtitlesDuringExtraction
@CanIgnoreReturnValue
@ExperimentalApi
default 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 | |
|---|---|
boolean parseSubtitlesDuringExtraction |
Whether to parse subtitles during extraction or rendering. |
| Returns | |
|---|---|
DashChunkSource.Factory |
This factory, for convenience. |
experimentalSetCodecsToParseWithinGopSampleDependencies
@CanIgnoreReturnValue
@ExperimentalApi
default DashChunkSource.Factory experimentalSetCodecsToParseWithinGopSampleDependencies(
@C.VideoCodecFlags int codecsToParseWithinGopSampleDependencies
)
Sets the set of video codecs for which within GOP sample dependency information should be parsed as part of extraction. Defaults to H.264 and H.265.
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 | |
|---|---|
@C.VideoCodecFlags int codecsToParseWithinGopSampleDependencies |
The set of codecs for which to parse within GOP sample dependency information. |
| Returns | |
|---|---|
DashChunkSource.Factory |
This factory, for convenience. |
getOutputTextFormat
default 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 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 | |
|---|---|
Format sourceFormat |
The original text-based format. |
| Returns | |
|---|---|
Format |
The |
setSubtitleParserFactory
@CanIgnoreReturnValue
default DashChunkSource.Factory setSubtitleParserFactory(SubtitleParser.Factory subtitleParserFactory)
Sets the SubtitleParser.Factory to use for parsing subtitles during extraction. The default factory value is implementation dependent.
| Parameters | |
|---|---|
SubtitleParser.Factory subtitleParserFactory |
The |
| Returns | |
|---|---|
DashChunkSource.Factory |
This factory, for convenience. |