HlsExtractorFactory
@UnstableApi
interface HlsExtractorFactory
DefaultHlsExtractorFactory |
Default |
Factory for HLS media chunk extractors.
Summary
Constants |
|
|---|---|
const HlsExtractorFactory! |
This property is deprecated.
|
Public functions |
|
|---|---|
HlsMediaChunkExtractor! |
createExtractor(Creates an |
HlsExtractorFactory! |
@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). |
HlsExtractorFactory! |
@CanIgnoreReturnValueSets the set of video codecs for which within GOP sample dependency information should be parsed as part of extraction. |
Format! |
getOutputTextFormat(sourceFormat: Format!)Returns the output |
HlsExtractorFactory! |
@CanIgnoreReturnValueSets the |
Constants
Public functions
createExtractor
fun createExtractor(
uri: Uri!,
format: Format!,
muxedCaptionFormats: (Mutable)List<Format!>?,
timestampAdjuster: TimestampAdjuster!,
responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!,
sniffingExtractorInput: ExtractorInput!,
playerId: PlayerId!
): HlsMediaChunkExtractor!
Creates an Extractor for extracting HLS media chunks.
| Parameters | |
|---|---|
uri: Uri! |
The URI of the media chunk. |
format: Format! |
A |
muxedCaptionFormats: (Mutable)List<Format!>? |
List of muxed caption |
timestampAdjuster: TimestampAdjuster! |
Adjuster corresponding to the provided discontinuity sequence number. |
responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>! |
The HTTP response headers associated with the media segment or initialization section to extract. |
sniffingExtractorInput: ExtractorInput! |
The first extractor input that will be passed to the returned extractor's |
playerId: PlayerId! |
The |
| Returns | |
|---|---|
HlsMediaChunkExtractor! |
| Throws | |
|---|---|
java.io.IOException |
If an I/O error is encountered while sniffing. |
experimentalParseSubtitlesDuringExtraction
@CanIgnoreReturnValue
@ExperimentalApi
fun experimentalParseSubtitlesDuringExtraction(
parseSubtitlesDuringExtraction: Boolean
): HlsExtractorFactory!
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 | |
|---|---|
HlsExtractorFactory! |
This factory, for convenience. |
experimentalSetCodecsToParseWithinGopSampleDependencies
@CanIgnoreReturnValue
@ExperimentalApi
fun experimentalSetCodecsToParseWithinGopSampleDependencies(
@C.VideoCodecFlags codecsToParseWithinGopSampleDependencies: Int
): HlsExtractorFactory!
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 codecsToParseWithinGopSampleDependencies: Int |
The set of codecs for which to parse within GOP sample dependency information. |
| Returns | |
|---|---|
HlsExtractorFactory! |
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 |
setSubtitleParserFactory
@CanIgnoreReturnValue
fun setSubtitleParserFactory(subtitleParserFactory: SubtitleParser.Factory!): HlsExtractorFactory!
Sets the SubtitleParser.Factory to use for parsing subtitles during extraction. The default factory value is implementation dependent.
| Parameters | |
|---|---|
subtitleParserFactory: SubtitleParser.Factory! |
The |
| Returns | |
|---|---|
HlsExtractorFactory! |
This factory, for convenience. |