FakeAdaptiveDataSet.Iterator


public final class FakeAdaptiveDataSet.Iterator extends BaseMediaChunkIterator


MediaChunkIterator for the chunks defined by a fake adaptive data set.

Summary

Public constructors

Iterator(
    FakeAdaptiveDataSet dataSet,
    int trackGroupIndex,
    int chunkIndex
)

Create iterator.

Public methods

long

Returns the media end time of the chunk, in microseconds.

long

Returns the media start time of the chunk, in microseconds.

DataSpec

Returns the DataSpec used to load the media chunk.

Inherited Constants

From androidx.media3.exoplayer.source.chunk.MediaChunkIterator
static final MediaChunkIterator

An empty media chunk iterator without available data.

Inherited methods

From androidx.media3.exoplayer.source.chunk.BaseMediaChunkIterator
final void

Verifies that the iterator points to a valid element.

final long

Returns the current index this iterator is pointing to.

boolean

Returns whether the iteration has reached the end of the available data.

boolean

Moves the iterator to the next media chunk.

void

Resets the iterator to the initial position.

Public constructors

Iterator

public Iterator(
    FakeAdaptiveDataSet dataSet,
    int trackGroupIndex,
    int chunkIndex
)

Create iterator.

Parameters
FakeAdaptiveDataSet dataSet

The data set to iterate over.

int trackGroupIndex

The index of the track group to iterate over.

int chunkIndex

The chunk index to which the iterator points initially.

Public methods

getChunkEndTimeUs

public long getChunkEndTimeUs()

Returns the media end time of the chunk, in microseconds.

Throws
java.util.NoSuchElementException

If the method is called before the first call to next or when isEnded is true.

getChunkStartTimeUs

public long getChunkStartTimeUs()

Returns the media start time of the chunk, in microseconds.

Throws
java.util.NoSuchElementException

If the method is called before the first call to next or when isEnded is true.

getDataSpec

public DataSpec getDataSpec()

Returns the DataSpec used to load the media chunk.

Throws
java.util.NoSuchElementException

If the method is called before the first call to next or when isEnded is true.