BundledChunkExtractor
public interface ChunkExtractor
Formats
from chunks.
The ChunkExtractor.TrackOutputProvider
passed to init(com.google.android.exoplayer2.source.chunk.ChunkExtractor.TrackOutputProvider, long, long)
provides the TrackOutputs
that receive the extracted data.
Modifier and Type | Interface | Description |
---|---|---|
static interface |
ChunkExtractor.TrackOutputProvider |
Provides
TrackOutput instances to be written to during extraction. |
Modifier and Type | Method | Description |
---|---|---|
ChunkIndex |
getChunkIndex() |
Returns the
ChunkIndex most recently obtained from the chunks, or null if a ChunkIndex has not been obtained. |
Format[] |
getSampleFormats() |
Returns the sample
Format s for the tracks identified by the extractor, or null if the
extractor has not finished identifying tracks. |
void |
init(ChunkExtractor.TrackOutputProvider trackOutputProvider,
long startTimeUs,
long endTimeUs) |
Initializes the wrapper to output to
TrackOutput s provided by the specified ChunkExtractor.TrackOutputProvider , and configures the extractor to receive data from a new chunk. |
boolean |
read(ExtractorInput input) |
Reads from the given
ExtractorInput . |
void |
release() |
Releases any held resources.
|
@Nullable ChunkIndex getChunkIndex()
ChunkIndex
most recently obtained from the chunks, or null if a ChunkIndex
has not been obtained.@Nullable Format[] getSampleFormats()
Format
s for the tracks identified by the extractor, or null if the
extractor has not finished identifying tracks.void init(@Nullable ChunkExtractor.TrackOutputProvider trackOutputProvider, long startTimeUs, long endTimeUs)
TrackOutput
s provided by the specified ChunkExtractor.TrackOutputProvider
, and configures the extractor to receive data from a new chunk.trackOutputProvider
- The provider of TrackOutput
s that will receive sample data.startTimeUs
- The start position in the new chunk, or C.TIME_UNSET
to output
samples from the start of the chunk.endTimeUs
- The end position in the new chunk, or C.TIME_UNSET
to output samples
to the end of the chunk.void release()
boolean read(ExtractorInput input) throws IOException
ExtractorInput
.input
- The input to read from.IOException
- If an error occurred reading from or parsing the input.