Class BundledHlsMediaChunkExtractor
- java.lang.Object
-
- com.google.android.exoplayer2.source.hls.BundledHlsMediaChunkExtractor
-
- All Implemented Interfaces:
HlsMediaChunkExtractor
@Deprecated public final class BundledHlsMediaChunkExtractor extends Object implements HlsMediaChunkExtractor
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.HlsMediaChunkExtractor
implementation that uses ExoPlayer app-bundledExtractors
.
-
-
Constructor Summary
Constructors Constructor Description BundledHlsMediaChunkExtractor(Extractor extractor, Format multivariantPlaylistFormat, TimestampAdjuster timestampAdjuster)
Deprecated.Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
init(ExtractorOutput extractorOutput)
Deprecated.Initializes the extractor with anExtractorOutput
.boolean
isPackedAudioExtractor()
Deprecated.Returns whether this is a packed audio extractor, as defined in RFC 8216, Section 3.4.boolean
isReusable()
Deprecated.Returns whether this instance can be used for extracting multiple continuous segments.void
onTruncatedSegmentParsed()
Deprecated.Resets the sample parsing state.boolean
read(ExtractorInput extractorInput)
Deprecated.Extracts data read from a providedExtractorInput
.HlsMediaChunkExtractor
recreate()
Deprecated.Returns a new instance for extracting the same type of media as this one.
-
-
-
Constructor Detail
-
BundledHlsMediaChunkExtractor
public BundledHlsMediaChunkExtractor(Extractor extractor, Format multivariantPlaylistFormat, TimestampAdjuster timestampAdjuster)
Deprecated.Creates a new instance.- Parameters:
extractor
- The underlyingExtractor
.multivariantPlaylistFormat
- TheFormat
obtained from the multivariant playlist.timestampAdjuster
- ATimestampAdjuster
to adjust sample timestamps.
-
-
Method Detail
-
init
public void init(ExtractorOutput extractorOutput)
Deprecated.Description copied from interface:HlsMediaChunkExtractor
Initializes the extractor with anExtractorOutput
. Called at most once.- Specified by:
init
in interfaceHlsMediaChunkExtractor
- Parameters:
extractorOutput
- AnExtractorOutput
to receive extracted data.
-
read
public boolean read(ExtractorInput extractorInput) throws IOException
Deprecated.Description copied from interface:HlsMediaChunkExtractor
Extracts data read from a providedExtractorInput
. Must not be called beforeHlsMediaChunkExtractor.init(ExtractorOutput)
.A single call to this method will block until some progress has been made, but will not block for longer than this. Hence each call will consume only a small amount of input data.
When this method throws an
IOException
, extraction may continue by providing anExtractorInput
with an unchangedread position
to a subsequent call to this method.- Specified by:
read
in interfaceHlsMediaChunkExtractor
- Parameters:
extractorInput
- The input to read from.- Returns:
- Whether there is any data left to extract. Returns false if the end of input has been reached.
- Throws:
IOException
- If an error occurred reading from or parsing the input.
-
isPackedAudioExtractor
public boolean isPackedAudioExtractor()
Deprecated.Description copied from interface:HlsMediaChunkExtractor
Returns whether this is a packed audio extractor, as defined in RFC 8216, Section 3.4.- Specified by:
isPackedAudioExtractor
in interfaceHlsMediaChunkExtractor
-
isReusable
public boolean isReusable()
Deprecated.Description copied from interface:HlsMediaChunkExtractor
Returns whether this instance can be used for extracting multiple continuous segments.- Specified by:
isReusable
in interfaceHlsMediaChunkExtractor
-
recreate
public HlsMediaChunkExtractor recreate()
Deprecated.Description copied from interface:HlsMediaChunkExtractor
Returns a new instance for extracting the same type of media as this one. Can only be called on instances that are notreusable
.- Specified by:
recreate
in interfaceHlsMediaChunkExtractor
-
onTruncatedSegmentParsed
public void onTruncatedSegmentParsed()
Deprecated.Description copied from interface:HlsMediaChunkExtractor
Resets the sample parsing state.Resetting the parsing state allows support for Fragmented MP4 EXT-X-I-FRAME-STREAM-INF segments. EXT-X-I-FRAME-STREAM-INF segments are truncated to include only a leading key frame. After parsing said keyframe, an extractor may reach an unexpected end of file. By resetting its state, we can continue feeding samples from the following segments to the extractor. See #7512 for context.
- Specified by:
onTruncatedSegmentParsed
in interfaceHlsMediaChunkExtractor
-
-