@UnstableApi
public interface DashChunkSource extends ChunkSource

Known direct subclasses
DefaultDashChunkSource

A default DashChunkSource implementation.


A ChunkSource for DASH streams.

Summary

Nested types

public interface DashChunkSource.Factory

Factory for DashChunkSources.

Public methods

abstract void
updateManifest(DashManifest newManifest, int newPeriodIndex)

Updates the manifest.

abstract void

Updates the track selection.

Inherited methods

From androidx.media3.exoplayer.source.chunk.ChunkSource
abstract long
getAdjustedSeekPositionUs(
    long positionUs,
    SeekParameters seekParameters
)

Adjusts a seek position given the specified SeekParameters.

abstract void
getNextChunk(
    LoadingInfo loadingInfo,
    long loadPositionUs,
    List<MediaChunk> queue,
    ChunkHolder out
)

Returns the next chunk to load.

abstract int
getPreferredQueueSize(long playbackPositionUs, List<MediaChunk> queue)

Evaluates whether MediaChunks should be removed from the back of the queue.

abstract void

If the source is currently having difficulty providing chunks, then this method throws the underlying error.

abstract void

Called when the ChunkSampleStream has finished loading a chunk obtained from this source.

abstract boolean
onChunkLoadError(
    Chunk chunk,
    boolean cancelable,
    LoadErrorHandlingPolicy.LoadErrorInfo loadErrorInfo,
    LoadErrorHandlingPolicy loadErrorHandlingPolicy
)

Called when the ChunkSampleStream encounters an error loading a chunk obtained from this source.

abstract void

Releases any held resources.

abstract boolean
shouldCancelLoad(
    long playbackPositionUs,
    Chunk loadingChunk,
    List<MediaChunk> queue
)

Returns whether an ongoing load of a chunk should be canceled.

Public methods

updateManifest

abstract void updateManifest(DashManifest newManifest, int newPeriodIndex)

Updates the manifest.

Parameters
DashManifest newManifest

The new manifest.

int newPeriodIndex

The index of the period covered by newManifest.

updateTrackSelection

abstract void updateTrackSelection(ExoTrackSelection trackSelection)

Updates the track selection.

Parameters
ExoTrackSelection trackSelection

The new track selection instance. Must be equivalent to the previous one.