Interface TrackSelection
-
- All Known Subinterfaces:
ExoTrackSelection
- All Known Implementing Classes:
AdaptiveTrackSelection
,BaseTrackSelection
,FakeTrackSelection
,FixedTrackSelection
,RandomTrackSelection
@Deprecated public interface TrackSelection
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.A track selection consisting of a static subset of selected tracks belonging to aTrackGroup
.Tracks belonging to the subset are exposed in decreasing bandwidth order.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
TrackSelection.Type
Deprecated.Represents a type track selection.
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE_CUSTOM_BASE
Deprecated.The first value that can be used for application specific track selection types.static int
TYPE_UNSET
Deprecated.An unspecified track selection type.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Format
getFormat(int index)
Deprecated.Returns the format of the track at a given index in the selection.int
getIndexInTrackGroup(int index)
Deprecated.Returns the index in the track group of the track at a given index in the selection.TrackGroup
getTrackGroup()
Deprecated.Returns theTrackGroup
to which the selected tracks belong.@com.google.android.exoplayer2.trackselection.TrackSelection.Type int
getType()
Deprecated.Returns an integer specifying the type of the selection, orTYPE_UNSET
if not specified.int
indexOf(int indexInTrackGroup)
Deprecated.Returns the index in the selection of the track with the specified index in the track group.int
indexOf(Format format)
Deprecated.Returns the index in the selection of the track with the specified format.int
length()
Deprecated.Returns the number of tracks in the selection.
-
-
-
Field Detail
-
TYPE_UNSET
static final int TYPE_UNSET
Deprecated.An unspecified track selection type.- See Also:
- Constant Field Values
-
TYPE_CUSTOM_BASE
static final int TYPE_CUSTOM_BASE
Deprecated.The first value that can be used for application specific track selection types.- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
@com.google.android.exoplayer2.trackselection.TrackSelection.Type int getType()
Deprecated.Returns an integer specifying the type of the selection, orTYPE_UNSET
if not specified.Track selection types are specific to individual applications, but should be defined starting from
TYPE_CUSTOM_BASE
to ensure they don't conflict with any types that may be added to the library in the future.
-
getTrackGroup
TrackGroup getTrackGroup()
Deprecated.Returns theTrackGroup
to which the selected tracks belong.
-
length
int length()
Deprecated.Returns the number of tracks in the selection.
-
getFormat
Format getFormat(int index)
Deprecated.Returns the format of the track at a given index in the selection.- Parameters:
index
- The index in the selection.- Returns:
- The format of the selected track.
-
getIndexInTrackGroup
int getIndexInTrackGroup(int index)
Deprecated.Returns the index in the track group of the track at a given index in the selection.- Parameters:
index
- The index in the selection.- Returns:
- The index of the selected track.
-
indexOf
int indexOf(Format format)
Deprecated.Returns the index in the selection of the track with the specified format. The format is located by identity so, for example,selection.indexOf(selection.getFormat(index)) == index
even if multiple selected tracks have formats that contain the same values.- Parameters:
format
- The format.- Returns:
- The index in the selection, or
C.INDEX_UNSET
if the track with the specified format is not part of the selection.
-
indexOf
int indexOf(int indexInTrackGroup)
Deprecated.Returns the index in the selection of the track with the specified index in the track group.- Parameters:
indexInTrackGroup
- The index in the track group.- Returns:
- The index in the selection, or
C.INDEX_UNSET
if the track with the specified index is not part of the selection.
-
-