public final class FixedTrackSelection extends BaseTrackSelection
TrackSelection consisting of a single track.| Modifier and Type | Class and Description |
|---|---|
static class |
FixedTrackSelection.Factory
Factory for
FixedTrackSelection instances. |
group, length, tracks| Constructor and Description |
|---|
FixedTrackSelection(TrackGroup group,
int track) |
FixedTrackSelection(TrackGroup group,
int track,
int reason,
java.lang.Object data) |
| Modifier and Type | Method and Description |
|---|---|
int |
getSelectedIndex()
Returns the index of the selected track.
|
java.lang.Object |
getSelectionData()
Returns optional data associated with the current track selection.
|
int |
getSelectionReason()
Returns the reason for the current track selection.
|
void |
updateSelectedTrack(long bufferedDurationUs)
Updates the selected track.
|
blacklist, equals, evaluateQueueSize, getFormat, getIndexInTrackGroup, getSelectedFormat, getSelectedIndexInTrackGroup, getTrackGroup, hashCode, indexOf, indexOf, isBlacklisted, lengthpublic FixedTrackSelection(TrackGroup group, int track)
group - The TrackGroup. Must not be null.track - The index of the selected track within the TrackGroup.public FixedTrackSelection(TrackGroup group, int track, int reason, java.lang.Object data)
group - The TrackGroup. Must not be null.track - The index of the selected track within the TrackGroup.reason - A reason for the track selection.data - Optional data associated with the track selection.public void updateSelectedTrack(long bufferedDurationUs)
TrackSelectionbufferedDurationUs - The duration of media currently buffered in microseconds.public int getSelectedIndex()
TrackSelectionpublic int getSelectionReason()
TrackSelectionpublic java.lang.Object getSelectionData()
TrackSelection