public static final class MediaSource.MediaPeriodId extends Object
MediaPeriod.| Modifier and Type | Field and Description |
|---|---|
int |
adGroupIndex
If the media period is in an ad group, the index of the ad group in the period.
|
int |
adIndexInAdGroup
If the media period is in an ad group, the index of the ad in its ad group in the period.
|
int |
periodIndex
The timeline period index.
|
static MediaSource.MediaPeriodId |
UNSET
Value for unset media period identifiers.
|
| Constructor and Description |
|---|
MediaPeriodId(int periodIndex)
Creates a media period identifier for the specified period in the timeline.
|
MediaPeriodId(int periodIndex,
int adGroupIndex,
int adIndexInAdGroup)
Creates a media period identifier that identifies an ad within an ad group at the specified
timeline period.
|
| Modifier and Type | Method and Description |
|---|---|
MediaSource.MediaPeriodId |
copyWithPeriodIndex(int newPeriodIndex)
Returns a copy of this period identifier but with
newPeriodIndex as its period index. |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isAd()
Returns whether this period identifier identifies an ad in an ad group in a period.
|
public static final MediaSource.MediaPeriodId UNSET
public final int periodIndex
public final int adGroupIndex
C.INDEX_UNSET otherwise.public final int adIndexInAdGroup
C.INDEX_UNSET otherwise.public MediaPeriodId(int periodIndex)
periodIndex - The timeline period index.public MediaPeriodId(int periodIndex,
int adGroupIndex,
int adIndexInAdGroup)
periodIndex - The index of the timeline period that contains the ad group.adGroupIndex - The index of the ad group.adIndexInAdGroup - The index of the ad in the ad group.public MediaSource.MediaPeriodId copyWithPeriodIndex(int newPeriodIndex)
newPeriodIndex as its period index.public boolean isAd()