Package com.castlabs.android.player
Class VideoTrackSelection
java.lang.Object
com.google.android.exoplayer2.trackselection.BaseTrackSelection
com.castlabs.android.player.VideoTrackSelection
- All Implemented Interfaces:
com.google.android.exoplayer2.trackselection.ExoTrackSelection,com.google.android.exoplayer2.trackselection.TrackSelection
public class VideoTrackSelection
extends com.google.android.exoplayer2.trackselection.BaseTrackSelection
Adaptive bitrate selection is implemented in this class.
- Since:
- 4.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe factory used to create instances of the track selectorNested classes/interfaces inherited from interface com.google.android.exoplayer2.trackselection.ExoTrackSelection
com.google.android.exoplayer2.trackselection.ExoTrackSelection.DefinitionNested classes/interfaces inherited from interface com.google.android.exoplayer2.trackselection.TrackSelection
com.google.android.exoplayer2.trackselection.TrackSelection.Type -
Field Summary
Fields inherited from interface com.google.android.exoplayer2.trackselection.TrackSelection
TYPE_CUSTOM_BASE, TYPE_UNSET -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()voidenable()intevaluateQueueSize(long playbackPositionUs, List<? extends com.google.android.exoplayer2.source.chunk.MediaChunk> queue) intintvoidvoidupdateSelectedTrack(long playbackPositionUs, long bufferedDurationUs, long availableDurationUs, List<? extends com.google.android.exoplayer2.source.chunk.MediaChunk> queue, com.google.android.exoplayer2.source.chunk.MediaChunkIterator[] mediaChunkIterators) Methods inherited from class com.google.android.exoplayer2.trackselection.BaseTrackSelection
equals, excludeTrack, getFormat, getIndexInTrackGroup, getSelectedFormat, getSelectedIndexInTrackGroup, getTrackGroup, getType, hashCode, indexOf, indexOf, isTrackExcluded, length, onPlaybackSpeedMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.android.exoplayer2.trackselection.ExoTrackSelection
getLatestBitrateEstimate, onPlayWhenReadyChanged, onRebuffer, shouldCancelChunkLoad
-
Method Details
-
onDiscontinuity
public void onDiscontinuity() -
getSelectedIndex
public int getSelectedIndex() -
getSelectionReason
public int getSelectionReason() -
getSelectionData
-
updateSelectedTrack
public void updateSelectedTrack(long playbackPositionUs, long bufferedDurationUs, long availableDurationUs, List<? extends com.google.android.exoplayer2.source.chunk.MediaChunk> queue, com.google.android.exoplayer2.source.chunk.MediaChunkIterator[] mediaChunkIterators) -
evaluateQueueSize
public int evaluateQueueSize(long playbackPositionUs, List<? extends com.google.android.exoplayer2.source.chunk.MediaChunk> queue) - Specified by:
evaluateQueueSizein interfacecom.google.android.exoplayer2.trackselection.ExoTrackSelection- Overrides:
evaluateQueueSizein classcom.google.android.exoplayer2.trackselection.BaseTrackSelection
-
enable
public void enable()- Specified by:
enablein interfacecom.google.android.exoplayer2.trackselection.ExoTrackSelection- Overrides:
enablein classcom.google.android.exoplayer2.trackselection.BaseTrackSelection
-
disable
public void disable()- Specified by:
disablein interfacecom.google.android.exoplayer2.trackselection.ExoTrackSelection- Overrides:
disablein classcom.google.android.exoplayer2.trackselection.BaseTrackSelection
-