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 class
TracksInfo.TrackGroupInfo
Information 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>
CREATOR
Object that can restore aTracksInfo
from aBundle
.static TracksInfo
EMPTY
An emptyTrackInfo
containing noTracksInfo.TrackGroupInfo
.
-
Constructor Summary
Constructors Constructor Description TracksInfo(List<TracksInfo.TrackGroupInfo> trackGroupInfos)
ConstructsTracksInfo
from the providedTracksInfo.TrackGroupInfo
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
ImmutableList<TracksInfo.TrackGroupInfo>
getTrackGroupInfos()
Returns theTrackGroupInfos
, describing eachTrackGroup
.int
hashCode()
boolean
isTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns if at least one track of the typetrackType
is selected for playback.boolean
isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns if there is at least one track of typetrackType
but none are supported.Bundle
toBundle()
Returns aBundle
representing the information stored in this object.
-
-
-
Field Detail
-
EMPTY
public static final TracksInfo EMPTY
An emptyTrackInfo
containing noTracksInfo.TrackGroupInfo
.
-
CREATOR
public static final Bundleable.Creator<TracksInfo> CREATOR
Object that can restore aTracksInfo
from aBundle
.
-
-
Constructor Detail
-
TracksInfo
public TracksInfo(List<TracksInfo.TrackGroupInfo> trackGroupInfos)
ConstructsTracksInfo
from 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 typetrackType
but none are supported.
-
isTypeSelected
public boolean isTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns if at least one track of the typetrackType
is selected for playback.
-
toBundle
public Bundle toBundle()
Description copied from interface:Bundleable
Returns aBundle
representing the information stored in this object.- Specified by:
toBundle
in interfaceBundleable
-
-