Class DefaultHlsExtractorFactory
- java.lang.Object
-
- com.google.android.exoplayer2.source.hls.DefaultHlsExtractorFactory
-
- All Implemented Interfaces:
HlsExtractorFactory
public final class DefaultHlsExtractorFactory extends Object implements HlsExtractorFactory
DefaultHlsExtractorFactoryimplementation.
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.source.hls.HlsExtractorFactory
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DefaultHlsExtractorFactory()DefaultHlsExtractorFactory(int payloadReaderFactoryFlags, boolean exposeCea608WhenMissingDeclarations)Creates a factory for HLS segment extractors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BundledHlsMediaChunkExtractorcreateExtractor(Uri uri, Format format, List<Format> muxedCaptionFormats, TimestampAdjuster timestampAdjuster, Map<String,List<String>> responseHeaders, ExtractorInput sniffingExtractorInput, PlayerId playerId)Creates anExtractorfor extracting HLS media chunks.
-
-
-
Constructor Detail
-
DefaultHlsExtractorFactory
public DefaultHlsExtractorFactory()
-
DefaultHlsExtractorFactory
public DefaultHlsExtractorFactory(int payloadReaderFactoryFlags, boolean exposeCea608WhenMissingDeclarations)Creates a factory for HLS segment extractors.- Parameters:
payloadReaderFactoryFlags- Flags to add when constructing anyDefaultTsPayloadReaderFactoryinstances. Other flags may be added on top ofpayloadReaderFactoryFlagswhen creatingDefaultTsPayloadReaderFactory.exposeCea608WhenMissingDeclarations- Whether createdTsExtractorinstances should expose a CEA-608 track should the multivariant playlist contain no Closed Captions declarations. If the multivariant playlist contains any Closed Captions declarations, this flag is ignored.
-
-
Method Detail
-
createExtractor
public BundledHlsMediaChunkExtractor createExtractor(Uri uri, Format format, @Nullable List<Format> muxedCaptionFormats, TimestampAdjuster timestampAdjuster, Map<String,List<String>> responseHeaders, ExtractorInput sniffingExtractorInput, PlayerId playerId) throws IOException
Description copied from interface:HlsExtractorFactoryCreates anExtractorfor extracting HLS media chunks.- Specified by:
createExtractorin interfaceHlsExtractorFactory- Parameters:
uri- The URI of the media chunk.format- AFormatassociated with the chunk to extract.muxedCaptionFormats- List of muxed captionFormats. Null if no closed caption information is available in the multivariant playlist.timestampAdjuster- Adjuster corresponding to the provided discontinuity sequence number.responseHeaders- The HTTP response headers associated with the media segment or initialization section to extract.sniffingExtractorInput- The first extractor input that will be passed to the returned extractor'sExtractor.read(ExtractorInput, PositionHolder). Must only be used to callExtractor.sniff(ExtractorInput).playerId- ThePlayerIdof the player using this extractors factory.- Returns:
- An
HlsMediaChunkExtractor. - Throws:
IOException- If an I/O error is encountered while sniffing.
-
-