public final class InitializationChunk extends Chunk
dataSource, dataSpec, endTimeUs, startTimeUs, trackFormat, trackSelectionData, trackSelectionReason, type
Constructor and Description |
---|
InitializationChunk(DataSource dataSource,
DataSpec dataSpec,
Format trackFormat,
int trackSelectionReason,
java.lang.Object trackSelectionData,
ChunkExtractorWrapper extractorWrapper) |
Modifier and Type | Method and Description |
---|---|
long |
bytesLoaded()
Returns the number of bytes that have been loaded.
|
void |
cancelLoad()
Cancels the load.
|
boolean |
isLoadCanceled()
Returns whether the load has been canceled.
|
void |
load()
Performs the load, returning on completion or cancellation.
|
getDurationUs
public InitializationChunk(DataSource dataSource, DataSpec dataSpec, Format trackFormat, int trackSelectionReason, java.lang.Object trackSelectionData, ChunkExtractorWrapper extractorWrapper)
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
.extractorWrapper
- A wrapped extractor to use for parsing the initialization data.public long bytesLoaded()
Chunk
bytesLoaded
in class Chunk
public void cancelLoad()
Loader.Loadable
public boolean isLoadCanceled()
Loader.Loadable
public void load() throws java.io.IOException, java.lang.InterruptedException
Loader.Loadable
java.io.IOException
java.lang.InterruptedException