SingleSampleMediaChunk


@UnstableApi
class SingleSampleMediaChunk : BaseMediaChunk


Summary

Public constructors

SingleSampleMediaChunk(
    dataSource: DataSource!,
    dataSpec: DataSpec!,
    trackFormat: Format!,
    @C.SelectionReason trackSelectionReason: Int,
    trackSelectionData: Any?,
    startTimeUs: Long,
    endTimeUs: Long,
    chunkIndex: Long,
    @C.TrackType trackType: Int,
    sampleFormat: Format!
)

This function is deprecated. Deprecated in Java

Public functions

Unit

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Inherited functions

From androidx.media3.exoplayer.source.chunk.BaseMediaChunk
Int
getFirstSampleIndex(trackIndex: Int)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

From androidx.media3.exoplayer.source.chunk.Chunk
Long

This function is deprecated. Deprecated in Java

Long

This function is deprecated. Deprecated in Java

(Mutable)Map<String!, (Mutable)List<String!>!>!

This function is deprecated. Deprecated in Java

Uri!

This function is deprecated. Deprecated in Java

From androidx.media3.exoplayer.source.chunk.MediaChunk
Long

This function is deprecated. Deprecated in Java

Inherited properties

From androidx.media3.exoplayer.source.chunk.BaseMediaChunk
Long

This property is deprecated. Deprecated in Java

Long

This property is deprecated. Deprecated in Java

@MonotonicNonNull BaseMediaChunkOutput!

This property is deprecated. Deprecated in Java

From androidx.media3.exoplayer.source.chunk.Chunk
StatsDataSource!

This property is deprecated. Deprecated in Java

DataSpec!

This property is deprecated. Deprecated in Java

Long

This property is deprecated. Deprecated in Java

Long

This property is deprecated. Deprecated in Java

Long

This property is deprecated. Deprecated in Java

String?

This property is deprecated. Deprecated in Java

Format!

This property is deprecated. Deprecated in Java

Any?

This property is deprecated. Deprecated in Java

Int

This property is deprecated. Deprecated in Java

Int

This property is deprecated. Deprecated in Java

From androidx.media3.exoplayer.source.chunk.MediaChunk
Long

This property is deprecated. Deprecated in Java

Public constructors

SingleSampleMediaChunk

SingleSampleMediaChunk(
    dataSource: DataSource!,
    dataSpec: DataSpec!,
    trackFormat: Format!,
    @C.SelectionReason trackSelectionReason: Int,
    trackSelectionData: Any?,
    startTimeUs: Long,
    endTimeUs: Long,
    chunkIndex: Long,
    @C.TrackType trackType: Int,
    sampleFormat: Format!
)
Parameters
dataSource: DataSource!

The source from which the data should be loaded.

dataSpec: DataSpec!

Defines the data to be loaded.

trackFormat: Format!

See trackFormat.

@C.SelectionReason trackSelectionReason: Int

See trackSelectionReason.

trackSelectionData: Any?

See trackSelectionData.

startTimeUs: Long

The start time of the media contained by the chunk, in microseconds.

endTimeUs: Long

The end time of the media contained by the chunk, in microseconds.

chunkIndex: Long

The index of the chunk, or INDEX_UNSET if it is not known.

@C.TrackType trackType: Int

The track type of the chunk.

sampleFormat: Format!

The Format of the sample in the chunk.

Public functions

cancelLoad

fun cancelLoad(): Unit

Cancels the load.

Loadable implementations should ensure that a currently executing load call will exit reasonably quickly after this method is called. The load call may exit either by returning or by throwing an IOException.

If there is a currently executing load call, then the thread on which that call is being made will be interrupted immediately after the call to this method. Hence implementations do not need to (and should not attempt to) interrupt the loading thread themselves.

Although the loading thread will be interrupted, Loadable implementations should not use the interrupted status of the loading thread in load to determine whether the load has been canceled. This approach is not robust [Internal ref: b/79223737]. Instead, implementations should use their own flag to signal cancelation (for example, using AtomicBoolean).

isLoadCompleted

fun isLoadCompleted(): Boolean

Returns whether the chunk has been fully loaded.

load

fun load(): Unit

Performs the load, returning on completion or cancellation.

Throws
java.io.IOException

If the input could not be loaded.