public final class TrackGroup
extends java.lang.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(java.lang.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, contain null elements or be of length 0.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.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object