docs/doc/reference/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.html
Package com.google.android.exoplayer2.extractor.mp4
All Implemented Interfaces:Extractor
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classFragmentedMp4Extractorextends[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 FMP4 container format.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | FragmentedMp4Extractor.Flags |
Deprecated.
Flags controlling the behavior of the extractor. |
-
Extractor.ReadResult
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static ExtractorsFactory | FACTORY |
Deprecated.
Factory for FragmentedMp4Extractor instances.
|
| static int | FLAG_ENABLE_EMSG_TRACK |
Deprecated.
Flag to indicate that the extractor should output an event message metadata track.
|
| static int | FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME |
Deprecated.
Flag to work around an issue in some video streams where every frame is marked as a sync frame.
|
| static int | FLAG_WORKAROUND_IGNORE_EDIT_LISTS |
Deprecated.
Flag to ignore any edit lists in the stream.
|
| static int | FLAG_WORKAROUND_IGNORE_TFDT_BOX |
Deprecated.
Flag to ignore any tfdt boxes in the stream. |
-
RESULT_CONTINUE, RESULT_END_OF_INPUT, RESULT_SEEK
Constructors | Constructor | Description |
| --- | --- |
| FragmentedMp4Extractor() |
Deprecated.
|
| FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags) |
Deprecated.
|
| FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags, TimestampAdjuster timestampAdjuster) |
Deprecated.
|
| FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack) |
Deprecated.
|
| FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats) |
Deprecated.
|
| FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats, TrackOutput additionalEmsgTrackOutput) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | init(ExtractorOutput output) |
Deprecated.
Initializes the extractor with an ExtractorOutput.
|
| protected Track | modifyTrack(Track track) |
Deprecated.
|
| 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.
|
-
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 FragmentedMp4Extractor instances.
-
public static final int FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME
Deprecated.
Flag to work around an issue in some video streams where every frame is marked as a sync frame. The workaround overrides the sync frame flags in the stream, forcing them to false except for the first sample in each segment.
This flag does nothing if the stream is not a video stream.
See Also:Constant Field Values
-
public static final int FLAG_WORKAROUND_IGNORE_TFDT_BOX
Deprecated.
Flag to ignore any tfdt boxes in the stream. See Also:Constant Field Values
-
public static final int FLAG_ENABLE_EMSG_TRACK
Deprecated.
Flag to indicate that the extractor should output an event message metadata track. Any event messages in the stream will be delivered as samples to this track. See Also:Constant Field Values
-
public static final int FLAG_WORKAROUND_IGNORE_EDIT_LISTS
Deprecated.
Flag to ignore any edit lists in the stream. See Also:Constant Field Values
-
public FragmentedMp4Extractor()
Deprecated.
-
public FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags)
Deprecated.
Parameters:flags - Flags that control the extractor's behavior.
-
public FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags,
@Nullable[TimestampAdjuster](../../util/TimestampAdjuster.html "class in com.google.android.exoplayer2.util")timestampAdjuster)
Deprecated.
Parameters:flags - Flags that control the extractor's behavior.timestampAdjuster - Adjusts sample timestamps. May be null if no adjustment is needed.
-
public FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags,
@Nullable[TimestampAdjuster](../../util/TimestampAdjuster.html "class in com.google.android.exoplayer2.util")timestampAdjuster,
@Nullable[Track](Track.html "class in com.google.android.exoplayer2.extractor.mp4")sideloadedTrack)
Deprecated.
Parameters:flags - Flags that control the extractor's behavior.timestampAdjuster - Adjusts sample timestamps. May be null if no adjustment is needed.sideloadedTrack - Sideloaded track information, in the case that the extractor will not receive a moov box in the input data. Null if a moov box is expected.
-
public FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags,
@Nullable[TimestampAdjuster](../../util/TimestampAdjuster.html "class in com.google.android.exoplayer2.util")timestampAdjuster,
@Nullable[Track](Track.html "class in com.google.android.exoplayer2.extractor.mp4")sideloadedTrack,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Format](../../Format.html "class in com.google.android.exoplayer2")> closedCaptionFormats)
Deprecated.
Parameters:flags - Flags that control the extractor's behavior.timestampAdjuster - Adjusts sample timestamps. May be null if no adjustment is needed.sideloadedTrack - Sideloaded track information, in the case that the extractor will not receive a moov box in the input data. Null if a moov box is expected.closedCaptionFormats - For tracks that contain SEI messages, the formats of the closed caption channels to expose.
-
public FragmentedMp4Extractor(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags,
@Nullable[TimestampAdjuster](../../util/TimestampAdjuster.html "class in com.google.android.exoplayer2.util")timestampAdjuster,
@Nullable[Track](Track.html "class in com.google.android.exoplayer2.extractor.mp4")sideloadedTrack,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Format](../../Format.html "class in com.google.android.exoplayer2")> closedCaptionFormats,
@Nullable[TrackOutput](../TrackOutput.html "interface in com.google.android.exoplayer2.extractor")additionalEmsgTrackOutput)
Deprecated.
Parameters:flags - Flags that control the extractor's behavior.timestampAdjuster - Adjusts sample timestamps. May be null if no adjustment is needed.sideloadedTrack - Sideloaded track information, in the case that the extractor will not receive a moov box in the input data. Null if a moov box is expected.closedCaptionFormats - For tracks that contain SEI messages, the formats of the closed caption channels to expose.additionalEmsgTrackOutput - An extra track output that will receive all emsg messages targeting the player, even if FLAG_ENABLE_EMSG_TRACK is not set. Null if special handling of emsg messages for players is not required.
-
public 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 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.
-
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 void release()
Deprecated.
Description copied from interface: Extractor
Releases all kept resources.
Specified by:release in interface Extractor
-
public 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.
-
@Nullable
protected[Track](Track.html "class in com.google.android.exoplayer2.extractor.mp4")modifyTrack(@Nullable[Track](Track.html "class in com.google.android.exoplayer2.extractor.mp4")track)
Deprecated.