public abstract class MediaChunk extends Chunk
Chunk
s that contain media samples.Modifier and Type | Field and Description |
---|---|
long |
chunkIndex
The chunk index, or
C.INDEX_UNSET if it is not known. |
dataSource, dataSpec, endTimeUs, startTimeUs, trackFormat, trackSelectionData, trackSelectionReason, type
Constructor and Description |
---|
MediaChunk(DataSource dataSource,
DataSpec dataSpec,
Format trackFormat,
int trackSelectionReason,
Object trackSelectionData,
long startTimeUs,
long endTimeUs,
long chunkIndex) |
Modifier and Type | Method and Description |
---|---|
long |
getNextChunkIndex()
Returns the next chunk index or
C.INDEX_UNSET if it is not known. |
abstract boolean |
isLoadCompleted()
Returns whether the chunk has been fully loaded.
|
bytesLoaded, getDurationUs, getResponseHeaders, getUri
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancelLoad, load
public final long chunkIndex
C.INDEX_UNSET
if it is not known.public MediaChunk(DataSource dataSource, DataSpec dataSpec, Format trackFormat, int trackSelectionReason, Object trackSelectionData, long startTimeUs, long endTimeUs, long chunkIndex)
dataSource
- The source from which the data should be loaded.dataSpec
- Defines the data to be loaded.trackFormat
- See Chunk.trackFormat
.trackSelectionReason
- See Chunk.trackSelectionReason
.trackSelectionData
- See Chunk.trackSelectionData
.startTimeUs
- The start time of the media contained by the chunk, in microseconds.endTimeUs
- The end time of the media contained by the chunk, in microseconds.chunkIndex
- The index of the chunk, or C.INDEX_UNSET
if it is not known.public long getNextChunkIndex()
C.INDEX_UNSET
if it is not known.public abstract boolean isLoadCompleted()