public final class DefaultHlsExtractorFactory extends java.lang.Object implements HlsExtractorFactory
HlsExtractorFactory implementation.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AAC_FILE_EXTENSION |
static java.lang.String |
AC3_FILE_EXTENSION |
static java.lang.String |
CMF_FILE_EXTENSION_PREFIX |
static java.lang.String |
EC3_FILE_EXTENSION |
static java.lang.String |
M4_FILE_EXTENSION_PREFIX |
static java.lang.String |
MP3_FILE_EXTENSION |
static java.lang.String |
MP4_FILE_EXTENSION |
static java.lang.String |
MP4_FILE_EXTENSION_PREFIX |
static java.lang.String |
VTT_FILE_EXTENSION |
static java.lang.String |
WEBVTT_FILE_EXTENSION |
DEFAULT| Constructor and Description |
|---|
DefaultHlsExtractorFactory()
Creates a factory for HLS segment extractors.
|
DefaultHlsExtractorFactory(int payloadReaderFactoryFlags)
Creates a factory for HLS segment extractors.
|
| Modifier and Type | Method and Description |
|---|---|
android.util.Pair<com.google.android.exoplayer2.extractor.Extractor,java.lang.Boolean> |
createExtractor(com.google.android.exoplayer2.extractor.Extractor previousExtractor,
android.net.Uri uri,
com.google.android.exoplayer2.Format format,
java.util.List<com.google.android.exoplayer2.Format> muxedCaptionFormats,
com.google.android.exoplayer2.drm.DrmInitData drmInitData,
com.google.android.exoplayer2.util.TimestampAdjuster timestampAdjuster,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> responseHeaders,
com.google.android.exoplayer2.extractor.ExtractorInput extractorInput)
Creates an
Extractor for extracting HLS media chunks. |
public static final java.lang.String AAC_FILE_EXTENSION
public static final java.lang.String AC3_FILE_EXTENSION
public static final java.lang.String EC3_FILE_EXTENSION
public static final java.lang.String MP3_FILE_EXTENSION
public static final java.lang.String MP4_FILE_EXTENSION
public static final java.lang.String M4_FILE_EXTENSION_PREFIX
public static final java.lang.String MP4_FILE_EXTENSION_PREFIX
public static final java.lang.String CMF_FILE_EXTENSION_PREFIX
public static final java.lang.String VTT_FILE_EXTENSION
public static final java.lang.String WEBVTT_FILE_EXTENSION
public DefaultHlsExtractorFactory()
public DefaultHlsExtractorFactory(int payloadReaderFactoryFlags)
payloadReaderFactoryFlags - Flags to add when constructing any DefaultTsPayloadReaderFactory instances. Other flags may be added on top of payloadReaderFactoryFlags when creating DefaultTsPayloadReaderFactory.public android.util.Pair<com.google.android.exoplayer2.extractor.Extractor,java.lang.Boolean> createExtractor(com.google.android.exoplayer2.extractor.Extractor previousExtractor,
android.net.Uri uri,
com.google.android.exoplayer2.Format format,
java.util.List<com.google.android.exoplayer2.Format> muxedCaptionFormats,
com.google.android.exoplayer2.drm.DrmInitData drmInitData,
com.google.android.exoplayer2.util.TimestampAdjuster timestampAdjuster,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> responseHeaders,
com.google.android.exoplayer2.extractor.ExtractorInput extractorInput)
throws java.lang.InterruptedException,
java.io.IOException
HlsExtractorFactoryExtractor for extracting HLS media chunks.createExtractor in interface HlsExtractorFactorypreviousExtractor - A previously used Extractor which can be reused if the current
chunk is a continuation of the previously extracted chunk, or null otherwise. It is the
responsibility of implementers to only reuse extractors that are suited for reusage.uri - The URI of the media chunk.format - A Format associated with the chunk to extract.muxedCaptionFormats - List of muxed caption Formats. Null if no closed caption
information is available in the master playlist.drmInitData - DrmInitData associated with the chunk.timestampAdjuster - Adjuster corresponding to the provided discontinuity sequence number.responseHeaders - The HTTP response headers associated with the media segment or
initialization section to extract.extractorInput - The first extractor input that will be passed to the returned
extractor's Extractor.read(ExtractorInput, PositionHolder). Must only be used to
call Extractor.sniff(ExtractorInput).Extractor and a boolean that indicates whether it is a
packed audio extractor. The first element may be previousExtractor if the factory
has determined it can be re-used.java.lang.InterruptedException - If the thread is interrupted while sniffing.java.io.IOException - If an I/O error is encountered while sniffing.