Class TrackGroupArray
- java.lang.Object
-
- com.google.android.exoplayer2.source.TrackGroupArray
-
- All Implemented Interfaces:
Bundleable
@Deprecated public final class TrackGroupArray extends Object implements Bundleable
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.An immutable array ofTrackGroups.This class is typically used to represent all of the tracks available in a piece of media. Tracks that are known to present the same content are grouped together (e.g., the same video feed provided at different resolutions in an adaptive stream). Tracks that are known to present different content are in separate track groups (e.g., an audio track will not be in the same group as a video track, and an audio track in one language will be in a different group to an audio track in another language).
-
-
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<TrackGroupArray>CREATORDeprecated.Object that can restores a TrackGroupArray from aBundle.static TrackGroupArrayEMPTYDeprecated.The empty array.intlengthDeprecated.The number of groups in the array.
-
Constructor Summary
Constructors Constructor Description TrackGroupArray(TrackGroup... trackGroups)Deprecated.Construct aTrackGroupArrayfrom an array ofTrackGroups.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)Deprecated.TrackGroupget(int index)Deprecated.Returns the group at a given index.inthashCode()Deprecated.intindexOf(TrackGroup group)Deprecated.Returns the index of a group within the array.booleanisEmpty()Deprecated.Returns whether this track group array is empty.BundletoBundle()Deprecated.Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
EMPTY
public static final TrackGroupArray EMPTY
Deprecated.The empty array.
-
length
public final int length
Deprecated.The number of groups in the array. Greater than or equal to zero.
-
CREATOR
public static final Bundleable.Creator<TrackGroupArray> CREATOR
Deprecated.Object that can restores a TrackGroupArray from aBundle.
-
-
Constructor Detail
-
TrackGroupArray
public TrackGroupArray(TrackGroup... trackGroups)
Deprecated.
-
-
Method Detail
-
get
public TrackGroup get(int index)
Deprecated.Returns the group at a given index.- Parameters:
index- The index of the group.- Returns:
- The group.
-
indexOf
public int indexOf(TrackGroup group)
Deprecated.Returns the index of a group within the array.- Parameters:
group- The group.- Returns:
- The index of the group, or
C.INDEX_UNSETif no such group exists.
-
isEmpty
public boolean isEmpty()
Deprecated.Returns whether this track group array is empty.
-
toBundle
public Bundle toBundle()
Deprecated.Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-