MediaChunk
@UnstableApi
abstract class MediaChunk : Chunk
| kotlin.Any | ||
| ↳ | androidx.media3.exoplayer.source.chunk.Chunk | |
| ↳ | androidx.media3.exoplayer.source.chunk.MediaChunk |
BaseMediaChunk |
A base implementation of |
FakeMediaChunk |
Fake |
ContainerMediaChunk |
A |
SingleSampleMediaChunk |
This class is deprecated. The only use for this class is subtitle playback, but it is only compatible with legacy subtitle decoding, which is not supported by default. |
An abstract base class for Chunks that contain media samples.
Summary
Public constructors |
|---|
MediaChunk( |
Public functions |
|
|---|---|
Long |
Returns the next chunk index or |
abstract Boolean |
Returns whether the chunk has been fully loaded. |
Public properties |
|
|---|---|
Long |
The chunk index, or |
Inherited functions |
|---|
Inherited properties |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
MediaChunk
MediaChunk(
dataSource: DataSource!,
dataSpec: DataSpec!,
trackFormat: Format!,
@C.SelectionReason trackSelectionReason: Int,
trackSelectionData: Any?,
startTimeUs: Long,
endTimeUs: Long,
chunkIndex: Long,
steeredPathwayId: String?
)
| Parameters | |
|---|---|
dataSource: DataSource! |
The source from which the data should be loaded. |
dataSpec: DataSpec! |
Defines the data to be loaded. |
trackFormat: Format! |
See |
@C.SelectionReason trackSelectionReason: Int |
See |
trackSelectionData: Any? |
See |
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 |
steeredPathwayId: String? |
See |
Public functions
getNextChunkIndex
fun getNextChunkIndex(): Long
Returns the next chunk index or INDEX_UNSET if it is not known.
isLoadCompleted
abstract fun isLoadCompleted(): Boolean
Returns whether the chunk has been fully loaded.