Package com.google.android.exoplayer2
Class AbstractConcatenatedTimeline
- java.lang.Object
-
- com.google.android.exoplayer2.Timeline
-
- com.google.android.exoplayer2.AbstractConcatenatedTimeline
-
- All Implemented Interfaces:
Bundleable
@Deprecated public abstract class AbstractConcatenatedTimeline extends Timeline
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Abstract base class for the concatenation of one or moreTimelines.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.android.exoplayer2.Timeline
Timeline.Period, Timeline.RemotableTimeline, Timeline.Window
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Constructor Summary
Constructors Constructor Description AbstractConcatenatedTimeline(boolean isAtomic, ShuffleOrder shuffleOrder)Deprecated.Sets up a concatenated timeline with a shuffle order of child timelines.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract intgetChildIndexByChildUid(Object childUid)Deprecated.Returns the index of the child timeline with the given UID orC.INDEX_UNSETif not found.protected abstract intgetChildIndexByPeriodIndex(int periodIndex)Deprecated.Returns the index of the child timeline containing the given period index.protected abstract intgetChildIndexByWindowIndex(int windowIndex)Deprecated.Returns the index of the child timeline containing the given window index.static ObjectgetChildPeriodUidFromConcatenatedUid(Object concatenatedUid)Deprecated.Returns UID of the period in the child timeline from a concatenated period UID.static ObjectgetChildTimelineUidFromConcatenatedUid(Object concatenatedUid)Deprecated.Returns UID of child timeline from a concatenated period UID.protected abstract ObjectgetChildUidByChildIndex(int childIndex)Deprecated.Returns the UID of the child timeline with the given index.static ObjectgetConcatenatedUid(Object childTimelineUid, Object childPeriodOrWindowUid)Deprecated.Returns a concatenated UID for a period or window in a child timeline.protected abstract intgetFirstPeriodIndexByChildIndex(int childIndex)Deprecated.Returns the first period index belonging to the child timeline with the given index.intgetFirstWindowIndex(boolean shuffleModeEnabled)Deprecated.Returns the index of the first window in the playback order depending on whether shuffling is enabled.protected abstract intgetFirstWindowIndexByChildIndex(int childIndex)Deprecated.Returns the first window index belonging to the child timeline with the given index.intgetIndexOfPeriod(Object uid)Deprecated.Returns the index of the period identified by its uniqueTimeline.Period.uid, orC.INDEX_UNSETif the period is not in the timeline.intgetLastWindowIndex(boolean shuffleModeEnabled)Deprecated.Returns the index of the last window in the playback order depending on whether shuffling is enabled.intgetNextWindowIndex(int windowIndex, @com.google.android.exoplayer2.Player.RepeatMode int repeatMode, boolean shuffleModeEnabled)Deprecated.Returns the index of the window after the window at indexwindowIndexdepending on therepeatModeand whether shuffling is enabled.Timeline.PeriodgetPeriod(int periodIndex, Timeline.Period period, boolean setIds)Deprecated.Populates aTimeline.Periodwith data for the period at the specified index.Timeline.PeriodgetPeriodByUid(Object periodUid, Timeline.Period period)Deprecated.Populates aTimeline.Periodwith data for the period with the specified unique identifier.intgetPreviousWindowIndex(int windowIndex, @com.google.android.exoplayer2.Player.RepeatMode int repeatMode, boolean shuffleModeEnabled)Deprecated.Returns the index of the window before the window at indexwindowIndexdepending on therepeatModeand whether shuffling is enabled.protected abstract TimelinegetTimelineByChildIndex(int childIndex)Deprecated.Returns the child timeline for the child with the given index.ObjectgetUidOfPeriod(int periodIndex)Deprecated.Returns the unique id of the period identified by its index in the timeline.Timeline.WindowgetWindow(int windowIndex, Timeline.Window window, long defaultPositionProjectionUs)Deprecated.Populates aTimeline.Windowwith data for the window at the specified index.-
Methods inherited from class com.google.android.exoplayer2.Timeline
equals, getNextPeriodIndex, getPeriod, getPeriodCount, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, getWindowCount, hashCode, isEmpty, isLastPeriod, toBundle, toBundleWithOneWindowOnly
-
-
-
-
Constructor Detail
-
AbstractConcatenatedTimeline
public AbstractConcatenatedTimeline(boolean isAtomic, ShuffleOrder shuffleOrder)Deprecated.Sets up a concatenated timeline with a shuffle order of child timelines.- Parameters:
isAtomic- Whether the child timelines shall be treated as atomic, i.e., treated as a single item for repeating and shuffling.shuffleOrder- A shuffle order of child timelines. The number of child timelines must match the number of elements in the shuffle order.
-
-
Method Detail
-
getChildTimelineUidFromConcatenatedUid
public static Object getChildTimelineUidFromConcatenatedUid(Object concatenatedUid)
Deprecated.Returns UID of child timeline from a concatenated period UID.- Parameters:
concatenatedUid- UID of a period in a concatenated timeline.- Returns:
- UID of the child timeline this period belongs to.
-
getChildPeriodUidFromConcatenatedUid
public static Object getChildPeriodUidFromConcatenatedUid(Object concatenatedUid)
Deprecated.Returns UID of the period in the child timeline from a concatenated period UID.- Parameters:
concatenatedUid- UID of a period in a concatenated timeline.- Returns:
- UID of the period in the child timeline.
-
getConcatenatedUid
public static Object getConcatenatedUid(Object childTimelineUid, Object childPeriodOrWindowUid)
Deprecated.Returns a concatenated UID for a period or window in a child timeline.- Parameters:
childTimelineUid- UID of the child timeline this period or window belongs to.childPeriodOrWindowUid- UID of the period or window in the child timeline.- Returns:
- UID of the period or window in the concatenated timeline.
-
getNextWindowIndex
public int getNextWindowIndex(int windowIndex, @RepeatMode @com.google.android.exoplayer2.Player.RepeatMode int repeatMode, boolean shuffleModeEnabled)Deprecated.Description copied from class:TimelineReturns the index of the window after the window at indexwindowIndexdepending on therepeatModeand whether shuffling is enabled.- Overrides:
getNextWindowIndexin classTimeline- Parameters:
windowIndex- Index of a window in the timeline.repeatMode- A repeat mode.shuffleModeEnabled- Whether shuffling is enabled.- Returns:
- The index of the next window, or
C.INDEX_UNSETif this is the last window.
-
getPreviousWindowIndex
public int getPreviousWindowIndex(int windowIndex, @RepeatMode @com.google.android.exoplayer2.Player.RepeatMode int repeatMode, boolean shuffleModeEnabled)Deprecated.Description copied from class:TimelineReturns the index of the window before the window at indexwindowIndexdepending on therepeatModeand whether shuffling is enabled.- Overrides:
getPreviousWindowIndexin classTimeline- Parameters:
windowIndex- Index of a window in the timeline.repeatMode- A repeat mode.shuffleModeEnabled- Whether shuffling is enabled.- Returns:
- The index of the previous window, or
C.INDEX_UNSETif this is the first window.
-
getLastWindowIndex
public int getLastWindowIndex(boolean shuffleModeEnabled)
Deprecated.Description copied from class:TimelineReturns the index of the last window in the playback order depending on whether shuffling is enabled.- Overrides:
getLastWindowIndexin classTimeline- Parameters:
shuffleModeEnabled- Whether shuffling is enabled.- Returns:
- The index of the last window in the playback order, or
C.INDEX_UNSETif the timeline is empty.
-
getFirstWindowIndex
public int getFirstWindowIndex(boolean shuffleModeEnabled)
Deprecated.Description copied from class:TimelineReturns the index of the first window in the playback order depending on whether shuffling is enabled.- Overrides:
getFirstWindowIndexin classTimeline- Parameters:
shuffleModeEnabled- Whether shuffling is enabled.- Returns:
- The index of the first window in the playback order, or
C.INDEX_UNSETif the timeline is empty.
-
getWindow
public final Timeline.Window getWindow(int windowIndex, Timeline.Window window, long defaultPositionProjectionUs)
Deprecated.Description copied from class:TimelinePopulates aTimeline.Windowwith data for the window at the specified index.- Specified by:
getWindowin classTimeline- Parameters:
windowIndex- The index of the window.window- TheTimeline.Windowto populate. Must not be null.defaultPositionProjectionUs- A duration into the future that the populated window's default start position should be projected.- Returns:
- The populated
Timeline.Window, for convenience.
-
getPeriodByUid
public final Timeline.Period getPeriodByUid(Object periodUid, Timeline.Period period)
Deprecated.Description copied from class:TimelinePopulates aTimeline.Periodwith data for the period with the specified unique identifier.- Overrides:
getPeriodByUidin classTimeline- Parameters:
periodUid- The unique identifier of the period.period- TheTimeline.Periodto populate. Must not be null.- Returns:
- The populated
Timeline.Period, for convenience.
-
getPeriod
public final Timeline.Period getPeriod(int periodIndex, Timeline.Period period, boolean setIds)
Deprecated.Description copied from class:TimelinePopulates aTimeline.Periodwith data for the period at the specified index.- Specified by:
getPeriodin classTimeline- Parameters:
periodIndex- The index of the period.period- TheTimeline.Periodto populate. Must not be null.setIds- WhetherTimeline.Period.idandTimeline.Period.uidshould be populated. If false, the fields will be set to null. The caller should pass false for efficiency reasons unless the fields are required.- Returns:
- The populated
Timeline.Period, for convenience.
-
getIndexOfPeriod
public final int getIndexOfPeriod(Object uid)
Deprecated.Description copied from class:TimelineReturns the index of the period identified by its uniqueTimeline.Period.uid, orC.INDEX_UNSETif the period is not in the timeline.- Specified by:
getIndexOfPeriodin classTimeline- Parameters:
uid- A unique identifier for a period.- Returns:
- The index of the period, or
C.INDEX_UNSETif the period was not found.
-
getUidOfPeriod
public final Object getUidOfPeriod(int periodIndex)
Deprecated.Description copied from class:TimelineReturns the unique id of the period identified by its index in the timeline.- Specified by:
getUidOfPeriodin classTimeline- Parameters:
periodIndex- The index of the period.- Returns:
- The unique id of the period.
-
getChildIndexByPeriodIndex
protected abstract int getChildIndexByPeriodIndex(int periodIndex)
Deprecated.Returns the index of the child timeline containing the given period index.- Parameters:
periodIndex- A valid period index within the bounds of the timeline.
-
getChildIndexByWindowIndex
protected abstract int getChildIndexByWindowIndex(int windowIndex)
Deprecated.Returns the index of the child timeline containing the given window index.- Parameters:
windowIndex- A valid window index within the bounds of the timeline.
-
getChildIndexByChildUid
protected abstract int getChildIndexByChildUid(Object childUid)
Deprecated.Returns the index of the child timeline with the given UID orC.INDEX_UNSETif not found.- Parameters:
childUid- A child UID.- Returns:
- Index of child timeline or
C.INDEX_UNSETif UID was not found.
-
getTimelineByChildIndex
protected abstract Timeline getTimelineByChildIndex(int childIndex)
Deprecated.Returns the child timeline for the child with the given index.- Parameters:
childIndex- A valid child index within the bounds of the timeline.
-
getFirstPeriodIndexByChildIndex
protected abstract int getFirstPeriodIndexByChildIndex(int childIndex)
Deprecated.Returns the first period index belonging to the child timeline with the given index.- Parameters:
childIndex- A valid child index within the bounds of the timeline.
-
getFirstWindowIndexByChildIndex
protected abstract int getFirstWindowIndexByChildIndex(int childIndex)
Deprecated.Returns the first window index belonging to the child timeline with the given index.- Parameters:
childIndex- A valid child index within the bounds of the timeline.
-
getChildUidByChildIndex
protected abstract Object getChildUidByChildIndex(int childIndex)
Deprecated.Returns the UID of the child timeline with the given index.- Parameters:
childIndex- A valid child index within the bounds of the timeline.
-
-