Timeline.Period, Timeline.Window| Constructor and Description |
|---|
SinglePeriodTimeline(long durationUs,
boolean isSeekable,
boolean isDynamic)
Creates a timeline containing a single period and a window that spans it.
|
SinglePeriodTimeline(long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic)
Creates a timeline with one period, and a window of known duration starting at a specified
position in the period.
|
SinglePeriodTimeline(long presentationStartTimeMs,
long windowStartTimeMs,
long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic)
Creates a timeline with one period, and a window of known duration starting at a specified
position in the period.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getIndexOfPeriod(java.lang.Object uid)
Returns the index of the period identified by its unique
id, 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.
|
Timeline.Window |
getWindow(int windowIndex,
Timeline.Window window,
boolean setIds,
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.
|
getFirstWindowIndex, getLastWindowIndex, getNextPeriodIndex, getNextWindowIndex, getPeriod, getPeriodPosition, getPeriodPosition, getPreviousWindowIndex, getWindow, getWindow, isEmpty, isLastPeriodpublic SinglePeriodTimeline(long durationUs,
boolean isSeekable,
boolean isDynamic)
durationUs - The duration of the period, in microseconds.isSeekable - Whether seeking is supported within the period.isDynamic - Whether the window may change when the timeline is updated.public SinglePeriodTimeline(long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic)
periodDurationUs - The duration of the period in microseconds.windowDurationUs - The duration of the window in microseconds.windowPositionInPeriodUs - The position of the start of the window in the period, in
microseconds.windowDefaultStartPositionUs - The default position relative to the start of the window at
which to begin playback, in microseconds.isSeekable - Whether seeking is supported within the window.isDynamic - Whether the window may change when the timeline is updated.public SinglePeriodTimeline(long presentationStartTimeMs,
long windowStartTimeMs,
long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic)
presentationStartTimeMs - The start time of the presentation in milliseconds since the
epoch.windowStartTimeMs - The window's start time in milliseconds since the epoch.periodDurationUs - The duration of the period in microseconds.windowDurationUs - The duration of the window in microseconds.windowPositionInPeriodUs - The position of the start of the window in the period, in
microseconds.windowDefaultStartPositionUs - The default position relative to the start of the window at
which to begin playback, in microseconds.isSeekable - Whether seeking is supported within the window.isDynamic - Whether the window may change when the timeline is updated.public int getWindowCount()
TimelinegetWindowCount in class Timelinepublic Timeline.Window getWindow(int windowIndex, Timeline.Window window, boolean setIds, 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.setIds - Whether Timeline.Window.id should be populated. If false, the field will be set to
null. The caller should pass false for efficiency reasons unless the field is required.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(java.lang.Object uid)
Timelineid, 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.