docs/doc/reference/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.html
Package com.google.android.exoplayer2.extractor.mkv
All Implemented Interfaces:Extractor
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classMatroskaExtractorextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Extractor](../Extractor.html "interface in com.google.android.exoplayer2.extractor")
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.
Extracts data from the Matroska and WebM container formats.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | MatroskaExtractor.Flags |
Deprecated.
Flags controlling the behavior of the extractor.
|
| protected static class | MatroskaExtractor.Track |
Deprecated.
Holds data corresponding to a single track. |
-
Extractor.ReadResult
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static ExtractorsFactory | FACTORY |
Deprecated.
Factory for MatroskaExtractor instances.
|
| static int | FLAG_DISABLE_SEEK_FOR_CUES |
Deprecated.
Flag to disable seeking for cues. |
-
RESULT_CONTINUE, RESULT_END_OF_INPUT, RESULT_SEEK
Constructors | Constructor | Description |
| --- | --- |
| MatroskaExtractor() |
Deprecated.
|
| MatroskaExtractor(@com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.Flags int flags) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| protected void | binaryElement(int id, int contentSize, ExtractorInput input) |
Deprecated.
Called when a binary element is encountered.
|
| protected void | endMasterElement(int id) |
Deprecated.
Called when the end of a master element is encountered.
|
| protected void | floatElement(int id, double value) |
Deprecated.
Called when a float element is encountered.
|
| protected MatroskaExtractor.Track | getCurrentTrack(int currentElementId) |
Deprecated.
Returns the track corresponding to the current TrackEntry element.
|
| protected @com.google.android.exoplayer2.extractor.mkv.EbmlProcessor.ElementType int | getElementType(int id) |
Deprecated.
Maps an element ID to a corresponding type.
|
| protected void | handleBlockAddIDExtraData(MatroskaExtractor.Track track, ExtractorInput input, int contentSize) |
Deprecated.
|
| protected void | handleBlockAdditionalData(MatroskaExtractor.Track track, int blockAdditionalId, ExtractorInput input, int contentSize) |
Deprecated.
|
| void | init(ExtractorOutput output) |
Deprecated.
Initializes the extractor with an ExtractorOutput.
|
| protected void | integerElement(int id, long value) |
Deprecated.
Called when an integer element is encountered.
|
| protected boolean | isLevel1Element(int id) |
Deprecated.
Checks if the given id is that of a level 1 element.
|
| int | read(ExtractorInput input, PositionHolder seekPosition) |
Deprecated.
Extracts data read from a provided ExtractorInput.
|
| void | release() |
Deprecated.
Releases all kept resources.
|
| void | seek(long position, long timeUs) |
Deprecated.
Notifies the extractor that a seek has occurred.
|
| boolean | sniff(ExtractorInput input) |
Deprecated.
Returns whether this extractor can extract samples from the ExtractorInput, which must provide data from the start of the stream.
|
| protected void | startMasterElement(int id, long contentPosition, long contentSize) |
Deprecated.
Called when the start of a master element is encountered.
|
| protected void | stringElement(int id, String value) |
Deprecated.
Called when a string element is encountered. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final[ExtractorsFactory](../ExtractorsFactory.html "interface in com.google.android.exoplayer2.extractor")FACTORY
Deprecated.
Factory for MatroskaExtractor instances.
-
public static final int FLAG_DISABLE_SEEK_FOR_CUES
Deprecated.
Flag to disable seeking for cues.
Normally (i.e. when this flag is not set) the extractor will seek to the cues element if its position is specified in the seek head and if it's after the first cluster. Setting this flag disables seeking to the cues element. If the cues element is after the first cluster then the media is treated as being unseekable.
See Also:Constant Field Values
-
public MatroskaExtractor()
Deprecated.
-
public MatroskaExtractor(@com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.Flags int flags)
Deprecated.
-
public final boolean sniff([ExtractorInput](../ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Description copied from interface: Extractor
Returns whether this extractor can extract samples from the ExtractorInput, which must provide data from the start of the stream.
If true is returned, the input's reading position may have been modified. Otherwise, only its peek position may have been modified.
Specified by:sniff in interface ExtractorParameters:input - The ExtractorInput from which data should be peeked/read.Returns:Whether this extractor can read the provided input.Throws:IOException - If an error occurred reading from the input.
-
public final void init([ExtractorOutput](../ExtractorOutput.html "interface in com.google.android.exoplayer2.extractor")output)
Deprecated.
Description copied from interface: Extractor
Initializes the extractor with an ExtractorOutput. Called at most once.
Specified by:init in interface ExtractorParameters:output - An ExtractorOutput to receive extracted data.
-
@CallSuper
public void seek(long position,
long timeUs)
Deprecated.
Description copied from interface: Extractor
Notifies the extractor that a seek has occurred.
Following a call to this method, the ExtractorInput passed to the next invocation of Extractor.read(ExtractorInput, PositionHolder) is required to provide data starting from position in the stream. Valid random access positions are the start of the stream and positions that can be obtained from any SeekMap passed to the ExtractorOutput.
Specified by:seek in interface ExtractorParameters:position - The byte offset in the stream from which data will be provided.timeUs - The seek time in microseconds.
-
public final void release()
Deprecated.
Description copied from interface: Extractor
Releases all kept resources.
Specified by:release in interface Extractor
-
public final int read([ExtractorInput](../ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,[PositionHolder](../PositionHolder.html "class in com.google.android.exoplayer2.extractor")seekPosition)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Description copied from interface: Extractor
Extracts data read from a provided ExtractorInput. Must not be called before Extractor.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.
In the common case, Extractor.RESULT_CONTINUE is returned to indicate that the ExtractorInput passed to the next read is required to provide data continuing from the position in the stream reached by the returning call. If the extractor requires data to be provided from a different position, then that position is set in seekPosition and Extractor.RESULT_SEEK is returned. If the extractor reached the end of the data provided by the ExtractorInput, then Extractor.RESULT_END_OF_INPUT is returned.
When this method throws an IOException, extraction may continue by providing an ExtractorInput with an unchanged read position to a subsequent call to this method.
Specified by:read in interface ExtractorParameters:input - The ExtractorInput from which data should be read.seekPosition - If Extractor.RESULT_SEEK is returned, this holder is updated to hold the position of the required data.Returns:One of the RESULT_ values defined in this interface.Throws:IOException - If an error occurred reading from or parsing the input.
-
@CallSuper
protected @com.google.android.exoplayer2.extractor.mkv.EbmlProcessor.ElementType int getElementType(int id)
Deprecated.
Maps an element ID to a corresponding type.
See Also:EbmlProcessor.getElementType(int)
-
@CallSuper
protected boolean isLevel1Element(int id)
Deprecated.
Checks if the given id is that of a level 1 element.
See Also:EbmlProcessor.isLevel1Element(int)
-
@CallSuper
protected void startMasterElement(int id,
long contentPosition,
long contentSize)
throws[ParserException](../../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
Called when the start of a master element is encountered.
Throws:ParserExceptionSee Also:EbmlProcessor.startMasterElement(int, long, long)
-
@CallSuper
protected void endMasterElement(int id)
throws[ParserException](../../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
Called when the end of a master element is encountered.
Throws:ParserExceptionSee Also:EbmlProcessor.endMasterElement(int)
-
@CallSuper
protected void integerElement(int id,
long value)
throws[ParserException](../../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
Called when an integer element is encountered.
Throws:ParserExceptionSee Also:EbmlProcessor.integerElement(int, long)
-
@CallSuper
protected void floatElement(int id,
double value)
throws[ParserException](../../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
Called when a float element is encountered.
Throws:ParserExceptionSee Also:EbmlProcessor.floatElement(int, double)
-
@CallSuper
protected void stringElement(int id,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")value)
throws[ParserException](../../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
Called when a string element is encountered.
Throws:ParserExceptionSee Also:EbmlProcessor.stringElement(int, String)
-
@CallSuper
protected void binaryElement(int id,
int contentSize,[ExtractorInput](../ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Called when a binary element is encountered.
Throws:IOExceptionSee Also:EbmlProcessor.binaryElement(int, int, ExtractorInput)
-
protected void handleBlockAddIDExtraData([MatroskaExtractor.Track](MatroskaExtractor.Track.html "class in com.google.android.exoplayer2.extractor.mkv")track,[ExtractorInput](../ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,
int contentSize)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Throws:IOException
-
protected void handleBlockAdditionalData([MatroskaExtractor.Track](MatroskaExtractor.Track.html "class in com.google.android.exoplayer2.extractor.mkv")track,
int blockAdditionalId,[ExtractorInput](../ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,
int contentSize)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Throws:IOException
-
protected[MatroskaExtractor.Track](MatroskaExtractor.Track.html "class in com.google.android.exoplayer2.extractor.mkv")getCurrentTrack(int currentElementId)
throws[ParserException](../../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
Returns the track corresponding to the current TrackEntry element.
Throws:ParserException - if the element id is not in a TrackEntry.