Class BaseMediaChunkIterator
- java.lang.Object
-
- com.google.android.exoplayer2.source.chunk.BaseMediaChunkIterator
-
- All Implemented Interfaces:
MediaChunkIterator
- Direct Known Subclasses:
DefaultDashChunkSource.RepresentationSegmentIterator,FakeAdaptiveDataSet.Iterator,FakeMediaChunkIterator
@Deprecated public abstract class BaseMediaChunkIterator extends Object implements MediaChunkIterator
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 forMediaChunkIterators. Handlesnext()andisEnded(), and provides a bounds check for child classes.
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.source.chunk.MediaChunkIterator
EMPTY
-
-
Constructor Summary
Constructors Constructor Description BaseMediaChunkIterator(long fromIndex, long toIndex)Deprecated.Creates base iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckInBounds()Deprecated.Verifies that the iterator points to a valid element.protected longgetCurrentIndex()Deprecated.Returns the current index this iterator is pointing to.booleanisEnded()Deprecated.Returns whether the iteration has reached the end of the available data.booleannext()Deprecated.Moves the iterator to the next media chunk.voidreset()Deprecated.Resets the iterator to the initial position.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.android.exoplayer2.source.chunk.MediaChunkIterator
getChunkEndTimeUs, getChunkStartTimeUs, getDataSpec
-
-
-
-
Method Detail
-
isEnded
public boolean isEnded()
Deprecated.Description copied from interface:MediaChunkIteratorReturns whether the iteration has reached the end of the available data.- Specified by:
isEndedin interfaceMediaChunkIterator
-
next
public boolean next()
Deprecated.Description copied from interface:MediaChunkIteratorMoves 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:
nextin interfaceMediaChunkIterator- Returns:
- Whether the iterator points to a media chunk with available data.
-
reset
public void reset()
Deprecated.Description copied from interface:MediaChunkIteratorResets the iterator to the initial position.- Specified by:
resetin interfaceMediaChunkIterator
-
checkInBounds
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.
-
getCurrentIndex
protected final long getCurrentIndex()
Deprecated.Returns the current index this iterator is pointing to.
-
-