docs/doc/reference/com/google/android/exoplayer2/extractor/mp4/Track.html
Package com.google.android.exoplayer2.extractor.mp4
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTrackextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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.
Encapsulates information describing an MP4 track.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | Track.Transformation |
Deprecated.
The transformation to apply to samples in the track, if any. |
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| long | durationUs |
Deprecated.
The duration of the track in microseconds, or C.TIME_UNSET if unknown.
|
| long[] | editListDurations |
Deprecated.
Durations of edit list segments in the movie timescale.
|
| long[] | editListMediaTimes |
Deprecated.
Media times for edit list segments in the track timescale.
|
| Format | format |
Deprecated.
The format.
|
| int | id |
Deprecated.
The track identifier.
|
| long | movieTimescale |
Deprecated.
The movie timescale.
|
| int | nalUnitLengthFieldLength |
Deprecated.
The length in bytes of the NALUnitLength field in each sample.
|
| @com.google.android.exoplayer2.extractor.mp4.Track.Transformation int | sampleTransformation |
Deprecated.
One of TRANSFORMATION_*.
|
| long | timescale |
Deprecated.
The track timescale, defined as the number of time units that pass in one second.
|
| static int | TRANSFORMATION_CEA608_CDAT |
Deprecated.
A transformation for caption samples in cdat atoms.
|
| static int | TRANSFORMATION_NONE |
Deprecated.
A no-op sample transformation.
|
| @com.google.android.exoplayer2.C.TrackType int | type |
Deprecated.
One of C.TRACK_TYPE_AUDIO, C.TRACK_TYPE_VIDEO and C.TRACK_TYPE_TEXT.
|
Constructors | Constructor | Description |
| --- | --- |
| Track(int id, @com.google.android.exoplayer2.C.TrackType int type, long timescale, long movieTimescale, long durationUs, Format format, @com.google.android.exoplayer2.extractor.mp4.Track.Transformation int sampleTransformation, TrackEncryptionBox[] sampleDescriptionEncryptionBoxes, int nalUnitLengthFieldLength, long[] editListDurations, long[] editListMediaTimes) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Track | copyWithFormat(Format format) |
Deprecated.
|
| TrackEncryptionBox | getSampleDescriptionEncryptionBox(int sampleDescriptionIndex) |
Deprecated.
Returns the TrackEncryptionBox for the given sample description index.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int TRANSFORMATION_NONE
Deprecated.
A no-op sample transformation. See Also:Constant Field Values
-
public static final int TRANSFORMATION_CEA608_CDAT
Deprecated.
A transformation for caption samples in cdat atoms. See Also:Constant Field Values
-
public final int id
Deprecated.
The track identifier.
-
public final @com.google.android.exoplayer2.C.TrackType int type
Deprecated.
One of C.TRACK_TYPE_AUDIO, C.TRACK_TYPE_VIDEO and C.TRACK_TYPE_TEXT.
-
public final long timescale
Deprecated.
The track timescale, defined as the number of time units that pass in one second.
-
public final long movieTimescale
Deprecated.
The movie timescale.
-
public final long durationUs
Deprecated.
The duration of the track in microseconds, or C.TIME_UNSET if unknown.
-
public final[Format](../../Format.html "class in com.google.android.exoplayer2")format
Deprecated.
The format.
-
public final @com.google.android.exoplayer2.extractor.mp4.Track.Transformation int sampleTransformation
Deprecated.
One of TRANSFORMATION_*. Defines the transformation to apply before outputting each sample.
-
@Nullable
public final long[] editListDurations
Deprecated.
Durations of edit list segments in the movie timescale. Null if there is no edit list.
-
@Nullable
public final long[] editListMediaTimes
Deprecated.
Media times for edit list segments in the track timescale. Null if there is no edit list.
-
public final int nalUnitLengthFieldLength
Deprecated.
The length in bytes of the NALUnitLength field in each sample. 0 for tracks that don't use length-delimited NAL units.
-
public Track(int id,
@com.google.android.exoplayer2.C.TrackType int type,
long timescale,
long movieTimescale,
long durationUs,[Format](../../Format.html "class in com.google.android.exoplayer2")format,
@com.google.android.exoplayer2.extractor.mp4.Track.Transformation int sampleTransformation,
@Nullable[TrackEncryptionBox](TrackEncryptionBox.html "class in com.google.android.exoplayer2.extractor.mp4")[] sampleDescriptionEncryptionBoxes,
int nalUnitLengthFieldLength,
@Nullable
long[] editListDurations,
@Nullable
long[] editListMediaTimes)
Deprecated.
-
@Nullable
public[TrackEncryptionBox](TrackEncryptionBox.html "class in com.google.android.exoplayer2.extractor.mp4")getSampleDescriptionEncryptionBox(int sampleDescriptionIndex)
Deprecated.
Returns the TrackEncryptionBox for the given sample description index.
Parameters:sampleDescriptionIndex - The given sample description indexReturns:The TrackEncryptionBox for the given sample description index. Maybe null if no such entry exists.
-
public[Track](Track.html "class in com.google.android.exoplayer2.extractor.mp4")copyWithFormat([Format](../../Format.html "class in com.google.android.exoplayer2")format)
Deprecated.