public static final class MediaSource.MediaPeriodId
extends java.lang.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.
|
long |
windowSequenceNumber
The sequence number of the window in the buffered sequence of windows this media period is
part of.
|
| Constructor and Description |
|---|
MediaPeriodId(int periodIndex)
Creates a media period identifier for a dummy period which is not part of a buffered sequence
of windows.
|
MediaPeriodId(int periodIndex,
int adGroupIndex,
int adIndexInAdGroup,
long windowSequenceNumber)
Creates a media period identifier that identifies an ad within an ad group at the specified
timeline period.
|
MediaPeriodId(int periodIndex,
long windowSequenceNumber)
Creates a media period identifier for the specified period in the timeline.
|
| 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(java.lang.Object obj) |
int |
hashCode() |
boolean |
isAd()
Returns whether this period identifier identifies an ad in an ad group in a period.
|
public final int periodIndex
public final int adGroupIndex
C.INDEX_UNSET otherwise.public final int adIndexInAdGroup
C.INDEX_UNSET otherwise.public final long windowSequenceNumber
C.INDEX_UNSET if the media period id is not part of a buffered sequence of
windows.public MediaPeriodId(int periodIndex)
periodIndex - The period index.public MediaPeriodId(int periodIndex,
long windowSequenceNumber)
periodIndex - The timeline period index.windowSequenceNumber - The sequence number of the window in the buffered sequence of
windows this media period is part of.public MediaPeriodId(int periodIndex,
int adGroupIndex,
int adIndexInAdGroup,
long windowSequenceNumber)
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.windowSequenceNumber - The sequence number of the window in the buffered sequence of
windows this media period is part of.public MediaSource.MediaPeriodId copyWithPeriodIndex(int newPeriodIndex)
newPeriodIndex as its period index.public boolean isAd()
public boolean equals(@Nullable
java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object