Back to Exoplayer

BaseMediaChunkIterator (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/chunk/BaseMediaChunkIterator.html

latest4.6 KB
Original Source

Package com.google.android.exoplayer2.source.chunk

Class BaseMediaChunkIterator

  • java.lang.Object

    • com.google.android.exoplayer2.source.chunk.BaseMediaChunkIterator
  • 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.

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

Constructor Detail

- 

BaseMediaChunkIterator

public BaseMediaChunkIterator​(long fromIndex,
                              long toIndex)

Deprecated.

Creates base iterator. Parameters:fromIndex - The first available index.toIndex - The last available index.

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 interface MediaChunkIterator

- 

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 interface MediaChunkIteratorReturns: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 interface MediaChunkIterator

- 

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.