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
Information about groups of tracks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTracksInfo.TrackGroupInfoInformation about a single group of tracks, including the underlyingTrackGroup, thetypeof tracks it contains, and the level to which each track is supported by the player.-
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 TracksInfoEMPTYAnTrackInfothat contains no tracks.
-
Constructor Summary
Constructors Constructor Description TracksInfo(List<TracksInfo.TrackGroupInfo> trackGroupInfos)Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)ImmutableList<TracksInfo.TrackGroupInfo>getTrackGroupInfos()Returns theTrackGroupInfosdescribing the groups of tracks.inthashCode()booleanisTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)Returns true if at least one track of the typetrackTypeis selected for playback.booleanisTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)Returns true if at least one track of typetrackTypeissupportedor if there are no tracks of this type.booleanisTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)Returns true if at least one track of typetrackTypeissupportedor if there are no tracks of this type.BundletoBundle()Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
EMPTY
public static final TracksInfo EMPTY
AnTrackInfothat contains no tracks.
-
CREATOR
public static final Bundleable.Creator<TracksInfo> CREATOR
Object that can restore aTracksInfofrom aBundle.
-
-
Constructor Detail
-
TracksInfo
public TracksInfo(List<TracksInfo.TrackGroupInfo> trackGroupInfos)
Constructs an instance.- Parameters:
trackGroupInfos- TheTrackGroupInfosdescribing the groups of tracks.
-
-
Method Detail
-
getTrackGroupInfos
public ImmutableList<TracksInfo.TrackGroupInfo> getTrackGroupInfos()
Returns theTrackGroupInfosdescribing the groups of tracks.
-
isTypeSupportedOrEmpty
public boolean isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns true if at least one track of typetrackTypeissupportedor if there are no tracks of this type.
-
isTypeSupportedOrEmpty
public boolean isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)Returns true if at least one track of typetrackTypeissupportedor if there are no tracks of this type.- Parameters:
allowExceedsCapabilities- Whether to consider the track as supported if it has a supportedMIME type, but otherwise exceeds the advertised capabilities of the device. For example, a video track for which there's a corresponding decoder whose maximum advertised resolution is exceeded by the resolution of the track. Such tracks may be playable in some cases.
-
isTypeSelected
public boolean isTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns true 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
-
-