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 forMediaChunkIterator
s. 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 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.-
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:MediaChunkIterator
Returns whether the iteration has reached the end of the available data.- Specified by:
isEnded
in interfaceMediaChunkIterator
-
next
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 interfaceMediaChunkIterator
- Returns:
- Whether the iterator points to a media chunk with available data.
-
reset
public void reset()
Deprecated.Description copied from interface:MediaChunkIterator
Resets the iterator to the initial position.- Specified by:
reset
in 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.
-
-