Class BundledExtractorsAdapter
- java.lang.Object
-
- com.google.android.exoplayer2.source.BundledExtractorsAdapter
-
- All Implemented Interfaces:
ProgressiveMediaExtractor
@Deprecated public final class BundledExtractorsAdapter extends Object implements ProgressiveMediaExtractor
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.ProgressiveMediaExtractorbuilt on top ofExtractorinstances, whose implementation classes are bundled in the app.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.source.ProgressiveMediaExtractor
ProgressiveMediaExtractor.Factory
-
-
Constructor Summary
Constructors Constructor Description BundledExtractorsAdapter(ExtractorsFactory extractorsFactory)Deprecated.Creates a holder that will select an extractor and initialize it using the specified output.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddisableSeekingOnMp3Streams()Deprecated.Disables seeking in MP3 streams.longgetCurrentInputPosition()Deprecated.Returns the current read position in the input stream, orC.INDEX_UNSETif no input is available.voidinit(DataReader dataReader, Uri uri, Map<String,List<String>> responseHeaders, long position, long length, ExtractorOutput output)Deprecated.Initializes the underlying infrastructure for reading from the input.intread(PositionHolder positionHolder)Deprecated.Extracts data starting at the current input stream position.voidrelease()Deprecated.Releases any held resources.voidseek(long position, long seekTimeUs)Deprecated.Notifies the extracting infrastructure that a seek has occurred.
-
-
-
Constructor Detail
-
BundledExtractorsAdapter
public BundledExtractorsAdapter(ExtractorsFactory extractorsFactory)
Deprecated.Creates a holder that will select an extractor and initialize it using the specified output.- Parameters:
extractorsFactory- TheExtractorsFactoryproviding the extractors to choose from.
-
-
Method Detail
-
init
public void init(DataReader dataReader, Uri uri, Map<String,List<String>> responseHeaders, long position, long length, ExtractorOutput output) throws IOException
Deprecated.Description copied from interface:ProgressiveMediaExtractorInitializes the underlying infrastructure for reading from the input.- Specified by:
initin interfaceProgressiveMediaExtractor- Parameters:
dataReader- TheDataReaderfrom which data should be read.uri- TheUrifrom which the media is obtained.responseHeaders- The response headers of the media, or an empty map if there are none.position- The initial position of thedataReaderin the stream.length- The length of the stream, orC.LENGTH_UNSETif length is unknown.output- TheExtractorOutputthat will be used to initialize the selected extractor.- Throws:
UnrecognizedInputFormatException- Thrown if the input format could not be detected.IOException- Thrown if the input could not be read.
-
release
public void release()
Deprecated.Description copied from interface:ProgressiveMediaExtractorReleases any held resources.- Specified by:
releasein interfaceProgressiveMediaExtractor
-
disableSeekingOnMp3Streams
public void disableSeekingOnMp3Streams()
Deprecated.Description copied from interface:ProgressiveMediaExtractorDisables seeking in MP3 streams.MP3 live streams commonly have seekable metadata, despite being unseekable.
- Specified by:
disableSeekingOnMp3Streamsin interfaceProgressiveMediaExtractor
-
getCurrentInputPosition
public long getCurrentInputPosition()
Deprecated.Description copied from interface:ProgressiveMediaExtractorReturns the current read position in the input stream, orC.INDEX_UNSETif no input is available.- Specified by:
getCurrentInputPositionin interfaceProgressiveMediaExtractor
-
seek
public void seek(long position, long seekTimeUs)Deprecated.Description copied from interface:ProgressiveMediaExtractorNotifies the extracting infrastructure that a seek has occurred.- Specified by:
seekin interfaceProgressiveMediaExtractor- Parameters:
position- The byte offset in the stream from which data will be provided.seekTimeUs- The seek time in microseconds.
-
read
public int read(PositionHolder positionHolder) throws IOException
Deprecated.Description copied from interface:ProgressiveMediaExtractorExtracts data starting at the current input stream position.- Specified by:
readin interfaceProgressiveMediaExtractor- Parameters:
positionHolder- IfExtractor.RESULT_SEEKis returned, this holder is updated to hold the position of the required data.- Returns:
- One of the
Extractor.RESULT_*values. - Throws:
IOException- If an error occurred reading from the input.
-
-