docs/doc/reference/com/google/android/exoplayer2/source/MediaParserExtractorAdapter.html
Package com.google.android.exoplayer2.source
All Implemented Interfaces:ProgressiveMediaExtractor
@RequiresApi(30)[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classMediaParserExtractorAdapterextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ProgressiveMediaExtractor](ProgressiveMediaExtractor.html "interface in com.google.android.exoplayer2.source")
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.
ProgressiveMediaExtractor implemented on top of the platform's MediaParser.
-
ProgressiveMediaExtractor.Factory
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static ProgressiveMediaExtractor.Factory | FACTORY |
Deprecated.
A ProgressiveMediaExtractor.Factory for instances of this class, which rely on platform extractors through MediaParser.
|
Constructors | Constructor | Description |
| --- | --- |
| MediaParserExtractorAdapter(PlayerId playerId) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | disableSeekingOnMp3Streams() |
Deprecated.
Disables seeking in MP3 streams.
|
| long | getCurrentInputPosition() |
Deprecated.
Returns the current read position in the input stream, or C.INDEX_UNSET if no input is available.
|
| void | init(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.
|
| int | read(PositionHolder positionHolder) |
Deprecated.
Extracts data starting at the current input stream position.
|
| void | release() |
Deprecated.
Releases any held resources.
|
| void | seek(long position, long seekTimeUs) |
Deprecated.
Notifies the extracting infrastructure that a seek has occurred. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final[ProgressiveMediaExtractor.Factory](ProgressiveMediaExtractor.Factory.html "interface in com.google.android.exoplayer2.source")FACTORY
Deprecated.
A ProgressiveMediaExtractor.Factory for instances of this class, which rely on platform extractors through MediaParser.
-
public MediaParserExtractorAdapter([PlayerId](../analytics/PlayerId.html "class in com.google.android.exoplayer2.analytics")playerId)
Deprecated.
-
public void init([DataReader](../upstream/DataReader.html "interface in com.google.android.exoplayer2.upstream")dataReader,[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri,[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[List](https://developer.android.com/reference/java/util/List.html?is-external=true "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")>> responseHeaders,
long position,
long length,[ExtractorOutput](../extractor/ExtractorOutput.html "interface in com.google.android.exoplayer2.extractor")output)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Description copied from interface: ProgressiveMediaExtractor
Initializes the underlying infrastructure for reading from the input.
Specified by:init in interface ProgressiveMediaExtractorParameters:dataReader - The DataReader from which data should be read.uri - The Uri from 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 the dataReader in the stream.length - The length of the stream, or C.LENGTH_UNSET if length is unknown.output - The ExtractorOutput that 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.
-
public void release()
Deprecated.
Description copied from interface: ProgressiveMediaExtractor
Releases any held resources.
Specified by:release in interface ProgressiveMediaExtractor
-
public void disableSeekingOnMp3Streams()
Deprecated.
Description copied from interface: ProgressiveMediaExtractor
Disables seeking in MP3 streams.
MP3 live streams commonly have seekable metadata, despite being unseekable.
Specified by:disableSeekingOnMp3Streams in interface ProgressiveMediaExtractor
-
public long getCurrentInputPosition()
Deprecated.
Description copied from interface: ProgressiveMediaExtractor
Returns the current read position in the input stream, or C.INDEX_UNSET if no input is available.
Specified by:getCurrentInputPosition in interface ProgressiveMediaExtractor
-
public void seek(long position,
long seekTimeUs)
Deprecated.
Description copied from interface: ProgressiveMediaExtractor
Notifies the extracting infrastructure that a seek has occurred.
Specified by:seek in interface ProgressiveMediaExtractorParameters:position - The byte offset in the stream from which data will be provided.seekTimeUs - The seek time in microseconds.
-
public int read([PositionHolder](../extractor/PositionHolder.html "class in com.google.android.exoplayer2.extractor")positionHolder)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Description copied from interface: ProgressiveMediaExtractor
Extracts data starting at the current input stream position.
Specified by:read in interface ProgressiveMediaExtractorParameters:positionHolder - If Extractor.RESULT_SEEK is 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.