Track
@UnstableApi
class Track
Encapsulates information describing an MP4 track.
Summary
Nested types |
|---|
@DocumentedThe transformation to apply to samples in the track, if any. |
Constants |
|
|---|---|
const Int |
A transformation for caption samples in cdat atoms. |
const Int |
A no-op sample transformation. |
Public constructors |
|---|
Track( |
Public functions |
|
|---|---|
Track! |
copyWithFormat(format: Format!) |
Track! |
|
TrackEncryptionBox? |
getSampleDescriptionEncryptionBox(sampleDescriptionIndex: Int)Returns the |
Public properties |
|
|---|---|
Long |
The duration of the track in microseconds, or |
LongArray<Long>? |
Durations of edit list segments in the movie timescale. |
LongArray<Long>? |
Media times for edit list segments in the track timescale. |
Format! |
The format. |
Int |
The track identifier. |
Long |
The duration of the media in microseconds, or |
Long |
The movie timescale. |
Int |
The length in bytes of the NALUnitLength field in each sample. |
Int |
One of |
Long |
The track timescale, defined as the number of time units that pass in one second. |
Int |
One of |
Constants
TRANSFORMATION_CEA608_CDAT
const val TRANSFORMATION_CEA608_CDAT = 1: Int
A transformation for caption samples in cdat atoms.
Public constructors
Track
Track(
id: Int,
@C.TrackType type: Int,
timescale: Long,
movieTimescale: Long,
durationUs: Long,
mediaDurationUs: Long,
format: Format!,
@Track.Transformation sampleTransformation: Int,
sampleDescriptionEncryptionBoxes: Array<TrackEncryptionBox!>?,
nalUnitLengthFieldLength: Int,
editListDurations: LongArray?,
editListMediaTimes: LongArray?
)
Public functions
getSampleDescriptionEncryptionBox
fun getSampleDescriptionEncryptionBox(sampleDescriptionIndex: Int): TrackEncryptionBox?
Returns the TrackEncryptionBox for the given sample description index.
| Parameters | |
|---|---|
sampleDescriptionIndex: Int |
The given sample description index |
| Returns | |
|---|---|
TrackEncryptionBox? |
The |
Public properties
durationUs
val durationUs: Long
The duration of the track in microseconds, or TIME_UNSET if unknown.
editListDurations
val editListDurations: LongArray<Long>?
Durations of edit list segments in the movie timescale. Null if there is no edit list.
editListMediaTimes
val editListMediaTimes: LongArray<Long>?
Media times for edit list segments in the track timescale. Null if there is no edit list.
mediaDurationUs
val mediaDurationUs: Long
The duration of the media in microseconds, or TIME_UNSET if unknown.
nalUnitLengthFieldLength
val nalUnitLengthFieldLength: Int
The length in bytes of the NALUnitLength field in each sample. 0 for tracks that don't use length-delimited NAL units.
sampleTransformation
@Track.Transformation
val sampleTransformation: Int
One of TRANSFORMATION_*. Defines the transformation to apply before outputting each sample.