@UnstableApi
public interface SsChunkSource extends ChunkSource

Known direct subclasses
DefaultSsChunkSource

A default SsChunkSource implementation.


A ChunkSource for SmoothStreaming.

Summary

Nested types

public interface SsChunkSource.Factory

Factory for SsChunkSources.

Public methods

abstract void

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(SsManifest newManifest)

Updates the manifest.

Parameters
SsManifest newManifest

The new manifest.

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.