docs/doc/reference/com/google/android/exoplayer2/source/chunk/BaseMediaChunkIterator.html
Package com.google.android.exoplayer2.source.chunk
All Implemented Interfaces:MediaChunkIteratorDirect Known Subclasses:DefaultDashChunkSource.RepresentationSegmentIterator, FakeAdaptiveDataSet.Iterator, FakeMediaChunkIterator
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classBaseMediaChunkIteratorextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[MediaChunkIterator](MediaChunkIterator.html "interface in com.google.android.exoplayer2.source.chunk")
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.
Base class for MediaChunkIterators. Handles next() and isEnded(), and provides a bounds check for child classes.
-
EMPTY
Constructors | Constructor | Description |
| --- | --- |
| BaseMediaChunkIterator(long fromIndex, long toIndex) |
Deprecated.
Creates base iterator. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| protected void | checkInBounds() |
Deprecated.
Verifies that the iterator points to a valid element.
|
| protected long | getCurrentIndex() |
Deprecated.
Returns the current index this iterator is pointing to.
|
| boolean | isEnded() |
Deprecated.
Returns whether the iteration has reached the end of the available data.
|
| boolean | next() |
Deprecated.
Moves the iterator to the next media chunk.
|
| void | reset() |
Deprecated.
Resets the iterator to the initial position. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
getChunkEndTimeUs, getChunkStartTimeUs, getDataSpec
-
public BaseMediaChunkIterator(long fromIndex,
long toIndex)
Deprecated.
Creates base iterator.
Parameters:fromIndex - The first available index.toIndex - The last available index.
-
public boolean isEnded()
Deprecated.
Description copied from interface: MediaChunkIterator
Returns whether the iteration has reached the end of the available data.
Specified by:isEnded in interface MediaChunkIterator
-
public boolean next()
Deprecated.
Description copied from interface: MediaChunkIterator
Moves the iterator to the next media chunk.
Check the return value or MediaChunkIterator.isEnded() to determine whether the iterator reached the end of the available data.
Specified by:next in interface MediaChunkIteratorReturns:Whether the iterator points to a media chunk with available data.
-
public void reset()
Deprecated.
Description copied from interface: MediaChunkIterator
Resets the iterator to the initial position.
Specified by:reset in interface MediaChunkIterator
-
protected final void checkInBounds()
Deprecated.
Verifies that the iterator points to a valid element.
Throws:NoSuchElementException - If the iterator does not point to a valid element.
-
protected final long getCurrentIndex()
Deprecated.
Returns the current index this iterator is pointing to.