TrackSampleTable
@UnstableApi
class TrackSampleTable
Sample table for a track in an MP4 file.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Int |
Returns the sample index of the closest synchronization sample at or before the given timestamp, if one is available. |
Int |
Returns the sample index of the closest synchronization sample at or after the given timestamp, if one is available. |
Public properties |
|
|---|---|
Long |
The duration of the track sample table in microseconds. |
IntArray<Int>! |
Sample flags. |
Boolean |
Whether all samples in the track are sync samples. |
Int |
Maximum sample size in |
LongArray<Long>! |
Sample offsets in bytes. |
Int |
Number of samples. |
IntArray<Int>! |
Sample sizes in bytes. |
IntArray<Int>! |
The indices of sync samples, sorted in ascending order. |
LongArray<Long>! |
Sample timestamps in microseconds. |
Track! |
The track corresponding to this sample table. |
Public constructors
Public functions
getIndexOfEarlierOrEqualSynchronizationSample
fun getIndexOfEarlierOrEqualSynchronizationSample(timeUs: Long): Int
Returns the sample index of the closest synchronization sample at or before the given timestamp, if one is available.
| Parameters | |
|---|---|
timeUs: Long |
Timestamp adjacent to which to find a synchronization sample. |
| Returns | |
|---|---|
Int |
Index of the synchronization sample, or |
getIndexOfLaterOrEqualSynchronizationSample
fun getIndexOfLaterOrEqualSynchronizationSample(timeUs: Long): Int
Returns the sample index of the closest synchronization sample at or after the given timestamp, if one is available.
| Parameters | |
|---|---|
timeUs: Long |
Timestamp adjacent to which to find a synchronization sample. |
| Returns | |
|---|---|
Int |
index Index of the synchronization sample, or |
Public properties
hasOnlySyncSamples
val hasOnlySyncSamples: Boolean
Whether all samples in the track are sync samples.
syncSampleIndices
val syncSampleIndices: IntArray<Int>!
The indices of sync samples, sorted in ascending order. This array is only populated if hasOnlySyncSamples is false.