Class DefaultTrackSelector.SelectionOverride
- java.lang.Object
-
- com.google.android.exoplayer2.trackselection.DefaultTrackSelector.SelectionOverride
-
- All Implemented Interfaces:
Bundleable
- Enclosing class:
- DefaultTrackSelector
public static final class DefaultTrackSelector.SelectionOverride extends Object implements Bundleable
A track selection override.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description static Bundleable.Creator<DefaultTrackSelector.SelectionOverride>
CREATOR
Object that can restoreSelectionOverride
from aBundle
.int
groupIndex
int
length
int[]
tracks
@com.google.android.exoplayer2.trackselection.TrackSelection.Type int
type
-
Constructor Summary
Constructors Constructor Description SelectionOverride(int groupIndex, int... tracks)
Constructs aSelectionOverride
to override tracks of a group.SelectionOverride(int groupIndex, int[] tracks, @com.google.android.exoplayer2.trackselection.TrackSelection.Type int type)
Constructs aSelectionOverride
of the given type to override tracks of a group.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsTrack(int track)
Returns whether this override contains the specified track index.boolean
equals(Object obj)
int
hashCode()
Bundle
toBundle()
Returns aBundle
representing the information stored in this object.
-
-
-
Field Detail
-
groupIndex
public final int groupIndex
-
tracks
public final int[] tracks
-
length
public final int length
-
type
public final @com.google.android.exoplayer2.trackselection.TrackSelection.Type int type
-
CREATOR
public static final Bundleable.Creator<DefaultTrackSelector.SelectionOverride> CREATOR
Object that can restoreSelectionOverride
from aBundle
.
-
-
Constructor Detail
-
SelectionOverride
public SelectionOverride(int groupIndex, int... tracks)
Constructs aSelectionOverride
to override tracks of a group.- Parameters:
groupIndex
- The overriding track group index.tracks
- The overriding track indices within the track group.
-
SelectionOverride
public SelectionOverride(int groupIndex, int[] tracks, @com.google.android.exoplayer2.trackselection.TrackSelection.Type int type)
Constructs aSelectionOverride
of the given type to override tracks of a group.- Parameters:
groupIndex
- The overriding track group index.tracks
- The overriding track indices within the track group.type
- The type that will be returned fromTrackSelection.getType()
.
-
-
Method Detail
-
containsTrack
public boolean containsTrack(int track)
Returns whether this override contains the specified track index.
-
toBundle
public Bundle toBundle()
Description copied from interface:Bundleable
Returns aBundle
representing the information stored in this object.- Specified by:
toBundle
in interfaceBundleable
-
-