@UnstableApi
interface DashChunkSource : ChunkSource

Known direct subclasses
DefaultDashChunkSource

A default DashChunkSource implementation.


A ChunkSource for DASH streams.

Summary

Nested types

Factory for DashChunkSources.

Public functions

BaseUrl?

Returns the selected BaseUrl.

Unit
updateManifest(newManifest: DashManifest!, newPeriodIndex: Int)

Updates the manifest.

Unit

Updates the track selection.

Inherited functions

From androidx.media3.exoplayer.source.chunk.ChunkSource
Long
getAdjustedSeekPositionUs(
    positionUs: Long,
    seekParameters: SeekParameters!
)

Adjusts a seek position given the specified SeekParameters.

Unit
getNextChunk(
    loadingInfo: LoadingInfo!,
    loadPositionUs: Long,
    queue: (Mutable)List<MediaChunk!>!,
    out: ChunkHolder!
)

Returns the next chunk to load.

Int
getPreferredQueueSize(
    playbackPositionUs: Long,
    queue: (Mutable)List<MediaChunk!>!
)

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

Unit

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

Unit

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

Boolean
onChunkLoadError(
    chunk: Chunk!,
    cancelable: Boolean,
    loadErrorInfo: LoadErrorHandlingPolicy.LoadErrorInfo!,
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!
)

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

Unit

Releases any held resources.

Boolean
shouldCancelLoad(
    playbackPositionUs: Long,
    loadingChunk: Chunk!,
    queue: (Mutable)List<MediaChunk!>!
)

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

Public functions

getSelectedBaseUrl

fun getSelectedBaseUrl(): BaseUrl?

Returns the selected BaseUrl.

The default implementation returns null.

Returns
BaseUrl?

The selected BaseUrl of this DashChunkSource. Can be null if unknown or if no BaseUrl has been selected.

updateManifest

fun updateManifest(newManifest: DashManifest!, newPeriodIndex: Int): Unit

Updates the manifest.

Parameters
newManifest: DashManifest!

The new manifest.

newPeriodIndex: Int

The index of the period covered by newManifest.

updateTrackSelection

fun updateTrackSelection(trackSelection: ExoTrackSelection!): Unit

Updates the track selection.

Parameters
trackSelection: ExoTrackSelection!

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