public abstract class MediaChunk extends Chunk
Chunk
s that contain media samples.Modifier and Type | Field and Description |
---|---|
int |
chunkIndex
The chunk index.
|
long |
endTimeUs
The end time of the media contained by the chunk.
|
long |
startTimeUs
The start time of the media contained by the chunk.
|
dataSource, dataSpec, format, NO_PARENT_ID, parentId, trigger, TRIGGER_ADAPTIVE, TRIGGER_CUSTOM_BASE, TRIGGER_INITIAL, TRIGGER_MANUAL, TRIGGER_TRICK_PLAY, TRIGGER_UNSPECIFIED, type, TYPE_CUSTOM_BASE, TYPE_DRM, TYPE_MANIFEST, TYPE_MEDIA, TYPE_MEDIA_INITIALIZATION, TYPE_UNSPECIFIED
Constructor and Description |
---|
MediaChunk(DataSource dataSource,
DataSpec dataSpec,
int trigger,
Format format,
long startTimeUs,
long endTimeUs,
int chunkIndex) |
MediaChunk(DataSource dataSource,
DataSpec dataSpec,
int trigger,
Format format,
long startTimeUs,
long endTimeUs,
int chunkIndex,
int parentId) |
Modifier and Type | Method and Description |
---|---|
long |
getDurationUs() |
int |
getNextChunkIndex() |
bytesLoaded
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancelLoad, isLoadCanceled, load
public final long startTimeUs
public final long endTimeUs
public final int chunkIndex
public MediaChunk(DataSource dataSource, DataSpec dataSpec, int trigger, Format format, long startTimeUs, long endTimeUs, int chunkIndex)
public MediaChunk(DataSource dataSource, DataSpec dataSpec, int trigger, Format format, long startTimeUs, long endTimeUs, int chunkIndex, int parentId)
dataSource
- A DataSource
for loading the data.dataSpec
- Defines the data to be loaded.trigger
- The reason for this chunk being selected.format
- The format of the stream to which this chunk belongs.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.parentId
- Identifier for a parent from which this chunk originates.