Class MediaLoadData
- java.lang.Object
-
- com.google.android.exoplayer2.source.MediaLoadData
-
public final class MediaLoadData extends Object
Descriptor for data being loaded or selected by aMediaSource.
-
-
Field Summary
Fields Modifier and Type Field Description intdataTypeThedata type.longmediaEndTimeMsThe end time of the media in theMediaPeriod, orC.TIME_UNSETif the data does not belong to a specificMediaPeriodor the end time is unknown.longmediaStartTimeMsThe start time of the media in theMediaPeriod, orC.TIME_UNSETif the data does not belong to a specificMediaPeriod.FormattrackFormatThe format of the track to which the data belongs.ObjecttrackSelectionDataOptional data associated with the selection of the track to which the data belongs.inttrackSelectionReasonOne of theselection reasonsif the data belongs to a track.@com.google.android.exoplayer2.C.TrackType inttrackTypeOne of thetrack types, which is a media track type if the data corresponds to media of a specific type, orC.TRACK_TYPE_UNKNOWNotherwise.
-
Constructor Summary
Constructors Constructor Description MediaLoadData(int dataType)Creates an instance with the givendataType.MediaLoadData(int dataType, @com.google.android.exoplayer2.C.TrackType int trackType, Format trackFormat, int trackSelectionReason, Object trackSelectionData, long mediaStartTimeMs, long mediaEndTimeMs)Creates media load data.
-
-
-
Field Detail
-
trackType
public final @com.google.android.exoplayer2.C.TrackType int trackType
One of thetrack types, which is a media track type if the data corresponds to media of a specific type, orC.TRACK_TYPE_UNKNOWNotherwise.
-
trackFormat
@Nullable public final Format trackFormat
The format of the track to which the data belongs. Null if the data does not belong to a specific track.
-
trackSelectionReason
public final int trackSelectionReason
One of theselection reasonsif the data belongs to a track.C.SELECTION_REASON_UNKNOWNotherwise.
-
trackSelectionData
@Nullable public final 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.
-
mediaStartTimeMs
public final long mediaStartTimeMs
The start time of the media in theMediaPeriod, orC.TIME_UNSETif the data does not belong to a specificMediaPeriod.
-
mediaEndTimeMs
public final long mediaEndTimeMs
The end time of the media in theMediaPeriod, orC.TIME_UNSETif the data does not belong to a specificMediaPeriodor the end time is unknown.
-
-
Constructor Detail
-
MediaLoadData
public MediaLoadData(@DataType int dataType)
Creates an instance with the givendataType.
-
MediaLoadData
public MediaLoadData(@DataType int dataType, @com.google.android.exoplayer2.C.TrackType int trackType, @Nullable Format trackFormat, @SelectionReason int trackSelectionReason, @Nullable Object trackSelectionData, long mediaStartTimeMs, long mediaEndTimeMs)
Creates media load data.- Parameters:
dataType- SeedataType.trackType- SeetrackType.trackFormat- SeetrackFormat.trackSelectionReason- SeetrackSelectionReason.trackSelectionData- SeetrackSelectionData.mediaStartTimeMs- SeemediaStartTimeMs.mediaEndTimeMs- SeemediaEndTimeMs.
-
-