public static final class MaskingMediaSource.PlaceholderTimeline extends Timeline
Timeline.Period, Timeline.Window| Constructor | Description |
|---|---|
PlaceholderTimeline(MediaItem mediaItem) |
Creates a new instance with the given media item.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getIndexOfPeriod(Object uid) |
Returns the index of the period identified by its unique
Timeline.Period.uid, or C.INDEX_UNSET if the period is not in the timeline. |
Timeline.Period |
getPeriod(int periodIndex,
Timeline.Period period,
boolean setIds) |
Populates a
Timeline.Period with data for the period at the specified index. |
int |
getPeriodCount() |
Returns the number of periods in the timeline.
|
Object |
getUidOfPeriod(int periodIndex) |
Returns the unique id of the period identified by its index in the timeline.
|
Timeline.Window |
getWindow(int windowIndex,
Timeline.Window window,
long defaultPositionProjectionUs) |
Populates a
Timeline.Window with data for the window at the specified index. |
int |
getWindowCount() |
Returns the number of windows in the timeline.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitequals, getFirstWindowIndex, getLastWindowIndex, getNextPeriodIndex, getNextWindowIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPreviousWindowIndex, getWindow, getWindow, hashCode, isEmpty, isLastPeriodpublic PlaceholderTimeline(MediaItem mediaItem)
public int getWindowCount()
TimelinegetWindowCount in class Timelinepublic Timeline.Window getWindow(int windowIndex, Timeline.Window window, long defaultPositionProjectionUs)
TimelineTimeline.Window with data for the window at the specified index.getWindow in class TimelinewindowIndex - The index of the window.window - The Timeline.Window to populate. Must not be null.defaultPositionProjectionUs - A duration into the future that the populated window's
default start position should be projected.Timeline.Window, for convenience.public int getPeriodCount()
TimelinegetPeriodCount in class Timelinepublic Timeline.Period getPeriod(int periodIndex, Timeline.Period period, boolean setIds)
TimelineTimeline.Period with data for the period at the specified index.getPeriod in class TimelineperiodIndex - The index of the period.period - The Timeline.Period to populate. Must not be null.setIds - Whether Timeline.Period.id and Timeline.Period.uid should be populated. If false,
the fields will be set to null. The caller should pass false for efficiency reasons unless
the fields are required.Timeline.Period, for convenience.public int getIndexOfPeriod(Object uid)
TimelineTimeline.Period.uid, or C.INDEX_UNSET if the period is not in the timeline.getIndexOfPeriod in class Timelineuid - A unique identifier for a period.C.INDEX_UNSET if the period was not found.public Object getUidOfPeriod(int periodIndex)
TimelinegetUidOfPeriod in class TimelineperiodIndex - The index of the period.