DefaultDashChunkSource.RepresentationSegmentIterator


protected class DefaultDashChunkSource.RepresentationSegmentIterator : BaseMediaChunkIterator


MediaChunkIterator wrapping a RepresentationHolder.

Summary

Public constructors

RepresentationSegmentIterator(
    representation: DefaultDashChunkSource.RepresentationHolder!,
    firstAvailableSegmentNum: Long,
    lastAvailableSegmentNum: Long,
    nowPeriodTimeUs: Long
)

Creates iterator.

Public functions

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
const MediaChunkIterator!

An empty media chunk iterator without available data.

Inherited functions

From androidx.media3.exoplayer.source.chunk.BaseMediaChunkIterator
Unit

Verifies that the iterator points to a valid element.

Boolean

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

Boolean

Moves the iterator to the next media chunk.

Unit

Resets the iterator to the initial position.

Public constructors

RepresentationSegmentIterator

RepresentationSegmentIterator(
    representation: DefaultDashChunkSource.RepresentationHolder!,
    firstAvailableSegmentNum: Long,
    lastAvailableSegmentNum: Long,
    nowPeriodTimeUs: Long
)

Creates iterator.

Parameters
representation: DefaultDashChunkSource.RepresentationHolder!

The RepresentationHolder to wrap.

firstAvailableSegmentNum: Long

The number of the first available segment.

lastAvailableSegmentNum: Long

The number of the last available segment.

nowPeriodTimeUs: Long

The current time in microseconds since the start of the period used for calculating if segments are available at full network speed.

Public functions

getChunkEndTimeUs

fun getChunkEndTimeUs(): Long

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

fun getChunkStartTimeUs(): Long

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

fun getDataSpec(): DataSpec!

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.