Package com.google.android.exoplayer2
Class TracksInfo
- java.lang.Object
-
- com.google.android.exoplayer2.TracksInfo
-
- All Implemented Interfaces:
Bundleable
public final class TracksInfo extends Object implements Bundleable
Immutable information (TracksInfo.TrackGroupInfo) about tracks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTracksInfo.TrackGroupInfoInformation about tracks in aTrackGroup: theirC.TrackType, if their format is supported by the player and if they are selected for playback.-
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<TracksInfo>CREATORObject that can restore aTracksInfofrom aBundle.static TracksInfoEMPTYAn emptyTrackInfocontaining noTracksInfo.TrackGroupInfo.
-
Constructor Summary
Constructors Constructor Description TracksInfo(List<TracksInfo.TrackGroupInfo> trackGroupInfos)ConstructsTracksInfofrom the providedTracksInfo.TrackGroupInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)ImmutableList<TracksInfo.TrackGroupInfo>getTrackGroupInfos()Returns theTrackGroupInfos, describing eachTrackGroup.inthashCode()booleanisTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)Returns if at least one track of the typetrackTypeis selected for playback.booleanisTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)Returns if there is at least one track of typetrackTypebut none are supported.BundletoBundle()Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
EMPTY
public static final TracksInfo EMPTY
An emptyTrackInfocontaining noTracksInfo.TrackGroupInfo.
-
CREATOR
public static final Bundleable.Creator<TracksInfo> CREATOR
Object that can restore aTracksInfofrom aBundle.
-
-
Constructor Detail
-
TracksInfo
public TracksInfo(List<TracksInfo.TrackGroupInfo> trackGroupInfos)
ConstructsTracksInfofrom the providedTracksInfo.TrackGroupInfo.
-
-
Method Detail
-
getTrackGroupInfos
public ImmutableList<TracksInfo.TrackGroupInfo> getTrackGroupInfos()
Returns theTrackGroupInfos, describing eachTrackGroup.
-
isTypeSupportedOrEmpty
public boolean isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns if there is at least one track of typetrackTypebut none are supported.
-
isTypeSelected
public boolean isTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns if at least one track of the typetrackTypeis selected for playback.
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-