Timeline.Period, Timeline.Window| Constructor | Description |
|---|---|
SinglePeriodTimeline(long durationUs,
boolean isSeekable,
boolean isDynamic,
boolean useLiveConfiguration,
Object manifest,
MediaItem mediaItem) |
Creates a timeline containing a single period and a window that spans it.
|
SinglePeriodTimeline(long durationUs,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
Object manifest,
Object tag) |
Deprecated.
|
SinglePeriodTimeline(long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic,
boolean useLiveConfiguration,
Object manifest,
MediaItem mediaItem) |
Creates a timeline with one period, and a window of known duration starting at a specified
position in the period.
|
SinglePeriodTimeline(long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
Object manifest,
Object tag) |
Deprecated.
|
SinglePeriodTimeline(long presentationStartTimeMs,
long windowStartTimeMs,
long elapsedRealtimeEpochOffsetMs,
long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
Object manifest,
Object tag) |
|
SinglePeriodTimeline(long presentationStartTimeMs,
long windowStartTimeMs,
long elapsedRealtimeEpochOffsetMs,
long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic,
Object manifest,
MediaItem mediaItem,
MediaItem.LiveConfiguration liveConfiguration) |
Creates a timeline with one period, and a window of known duration starting at a specified
position in the period.
|
| 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, isLastPeriod@Deprecated public SinglePeriodTimeline(long durationUs, boolean isSeekable, boolean isDynamic, boolean isLive, @Nullable Object manifest, @Nullable Object tag)
public SinglePeriodTimeline(long durationUs,
boolean isSeekable,
boolean isDynamic,
boolean useLiveConfiguration,
@Nullable
Object manifest,
MediaItem mediaItem)
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.useLiveConfiguration - Whether the window is live and MediaItem.liveConfiguration
is used to configure live playback behaviour.manifest - The manifest. May be null.mediaItem - A media item used for Timeline.Window.mediaItem.@Deprecated public SinglePeriodTimeline(long periodDurationUs, long windowDurationUs, long windowPositionInPeriodUs, long windowDefaultStartPositionUs, boolean isSeekable, boolean isDynamic, boolean isLive, @Nullable Object manifest, @Nullable Object tag)
public SinglePeriodTimeline(long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic,
boolean useLiveConfiguration,
@Nullable
Object manifest,
MediaItem mediaItem)
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.useLiveConfiguration - Whether the window is live and MediaItem.liveConfiguration
is used to configure live playback behaviour.manifest - The manifest. May be (@code null}.mediaItem - A media item used for Timeline.Window.mediaItem.@Deprecated public SinglePeriodTimeline(long presentationStartTimeMs, long windowStartTimeMs, long elapsedRealtimeEpochOffsetMs, long periodDurationUs, long windowDurationUs, long windowPositionInPeriodUs, long windowDefaultStartPositionUs, boolean isSeekable, boolean isDynamic, boolean isLive, @Nullable Object manifest, @Nullable Object tag)
public SinglePeriodTimeline(long presentationStartTimeMs,
long windowStartTimeMs,
long elapsedRealtimeEpochOffsetMs,
long periodDurationUs,
long windowDurationUs,
long windowPositionInPeriodUs,
long windowDefaultStartPositionUs,
boolean isSeekable,
boolean isDynamic,
@Nullable
Object manifest,
MediaItem mediaItem,
@Nullable
MediaItem.LiveConfiguration liveConfiguration)
presentationStartTimeMs - The start time of the presentation in milliseconds since the
epoch, or C.TIME_UNSET if unknown or not applicable.windowStartTimeMs - The window's start time in milliseconds since the epoch, or C.TIME_UNSET if unknown or not applicable.elapsedRealtimeEpochOffsetMs - The offset between SystemClock.elapsedRealtime() and the time since the Unix epoch according to
the clock of the media origin server, or C.TIME_UNSET if unknown or not applicable.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.manifest - The manifest. May be null.mediaItem - A media item used for Timeline.Window.mediaItem.liveConfiguration - The configuration for live playback behaviour, or null if the
window is not live.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.