public abstract class BaseMediaChunk extends MediaChunk
MediaChunk that outputs to a BaseMediaChunkOutput.| Modifier and Type | Field and Description |
|---|---|
long |
seekTimeUs
The media time from which output will begin, or
C.TIME_UNSET if the whole chunk should
be output. |
chunkIndexdataSource, dataSpec, endTimeUs, startTimeUs, trackFormat, trackSelectionData, trackSelectionReason, type| Constructor and Description |
|---|
BaseMediaChunk(DataSource dataSource,
DataSpec dataSpec,
Format trackFormat,
int trackSelectionReason,
java.lang.Object trackSelectionData,
long startTimeUs,
long endTimeUs,
long seekTimeUs,
long chunkIndex) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFirstSampleIndex(int trackIndex)
Returns the index of the first sample in the specified track of the output that will originate
from this chunk.
|
protected BaseMediaChunkOutput |
getOutput()
Returns the output most recently passed to
init(BaseMediaChunkOutput). |
void |
init(BaseMediaChunkOutput output)
Initializes the chunk for loading, setting the
BaseMediaChunkOutput that will receive
samples as they are loaded. |
getNextChunkIndex, isLoadCompletedbytesLoaded, getDurationUsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancelLoad, loadpublic final long seekTimeUs
C.TIME_UNSET if the whole chunk should
be output.public BaseMediaChunk(DataSource dataSource, DataSpec dataSpec, Format trackFormat, int trackSelectionReason, java.lang.Object trackSelectionData, long startTimeUs, long endTimeUs, long seekTimeUs, 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.seekTimeUs - The media time from which output will begin, or C.TIME_UNSET if the
whole chunk should be output.chunkIndex - The index of the chunk, or C.INDEX_UNSET if it is not known.public void init(BaseMediaChunkOutput output)
BaseMediaChunkOutput that will receive
samples as they are loaded.output - The output that will receive the loaded media samples.public final int getFirstSampleIndex(int trackIndex)
protected final BaseMediaChunkOutput getOutput()
init(BaseMediaChunkOutput).