MediaLoadData
@UnstableApi
public final class MediaLoadData
Descriptor for data being loaded or selected by a MediaSource.
Summary
Public fields |
|
|---|---|
final int |
The |
final long |
The end time of the media in the |
final long |
The start time of the media in the |
final @Nullable Format |
The format of the track to which the data belongs. |
final @Nullable Object |
Optional data associated with the selection of the track to which the data belongs. |
final int |
One of the |
final int |
One of the |
Public constructors |
|---|
MediaLoadData(@C.DataType int dataType)Creates an instance with the given |
MediaLoadData(Creates media load data. |
Public fields
mediaEndTimeMs
public final long mediaEndTimeMs
The end time of the media in the MediaPeriod, or TIME_UNSET if the data does not belong to a specific MediaPeriod or the end time is unknown.
mediaStartTimeMs
public final long mediaStartTimeMs
The start time of the media in the MediaPeriod, or TIME_UNSET if the data does not belong to a specific MediaPeriod.
trackFormat
public final @Nullable Format trackFormat
The format of the track to which the data belongs. Null if the data does not belong to a specific track.
trackSelectionData
public final @Nullable Object trackSelectionData
Optional data associated with the selection of the track to which the data belongs. Null if the data does not belong to a track.
trackSelectionReason
@C.SelectionReason
public final int trackSelectionReason
One of the selection reasons if the data belongs to a track. SELECTION_REASON_UNKNOWN otherwise.
trackType
@C.TrackType
public final int trackType
One of the track types, which is a media track type if the data corresponds to media of a specific type, or TRACK_TYPE_UNKNOWN otherwise.
Public constructors
MediaLoadData
public MediaLoadData(@C.DataType int dataType)
Creates an instance with the given dataType.
MediaLoadData
public MediaLoadData(
@C.DataType int dataType,
@C.TrackType int trackType,
@Nullable Format trackFormat,
@C.SelectionReason int trackSelectionReason,
@Nullable Object trackSelectionData,
long mediaStartTimeMs,
long mediaEndTimeMs
)
Creates media load data.
| Parameters | |
|---|---|
@C.DataType int dataType |
See |
@C.TrackType int trackType |
See |
@Nullable Format trackFormat |
See |
@C.SelectionReason int trackSelectionReason |
See |
@Nullable Object trackSelectionData |
See |
long mediaStartTimeMs |
See |
long mediaEndTimeMs |
See |