public final class TrackGroup extends Object
MediaPeriod
.
A MediaPeriod
is only able to provide one SampleStream
corresponding to a group
at any given time, however this SampleStream
may adapt between multiple tracks within the
group.
Modifier and Type | Field and Description |
---|---|
int |
length
The number of tracks in the group.
|
Constructor and Description |
---|
TrackGroup(Format... formats) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Format |
getFormat(int index)
Returns the format of the track at a given index.
|
int |
hashCode() |
int |
indexOf(Format format)
Returns the index of the track with the given format in the group.
|
public TrackGroup(Format... formats)
formats
- The track formats. Must not be null or contain null elements.public Format getFormat(int index)
index
- The index of the track.public int indexOf(Format format)
format
- The format.C.INDEX_UNSET
if no such track exists.