Interface ChunkExtractor
-
- All Known Implementing Classes:
BundledChunkExtractor,MediaParserChunkExtractor
@Deprecated public interface ChunkExtractor
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Extracts samples and trackFormatsfrom chunks.The
ChunkExtractor.TrackOutputProviderpassed toinit(com.google.android.exoplayer2.source.chunk.ChunkExtractor.TrackOutputProvider, long, long)provides theTrackOutputsthat receive the extracted data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceChunkExtractor.FactoryDeprecated.CreatesChunkExtractorinstances.static interfaceChunkExtractor.TrackOutputProviderDeprecated.ProvidesTrackOutputinstances to be written to during extraction.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ChunkIndexgetChunkIndex()Deprecated.Returns theChunkIndexmost recently obtained from the chunks, or null if aChunkIndexhas not been obtained.Format[]getSampleFormats()Deprecated.Returns the sampleFormats for the tracks identified by the extractor, or null if the extractor has not finished identifying tracks.voidinit(ChunkExtractor.TrackOutputProvider trackOutputProvider, long startTimeUs, long endTimeUs)Deprecated.Initializes the wrapper to output toTrackOutputs provided by the specifiedChunkExtractor.TrackOutputProvider, and configures the extractor to receive data from a new chunk.booleanread(ExtractorInput input)Deprecated.Reads from the givenExtractorInput.voidrelease()Deprecated.Releases any held resources.
-
-
-
Method Detail
-
getChunkIndex
@Nullable ChunkIndex getChunkIndex()
Deprecated.Returns theChunkIndexmost recently obtained from the chunks, or null if aChunkIndexhas not been obtained.
-
getSampleFormats
@Nullable Format[] getSampleFormats()
Deprecated.Returns the sampleFormats for the tracks identified by the extractor, or null if the extractor has not finished identifying tracks.
-
init
void init(@Nullable ChunkExtractor.TrackOutputProvider trackOutputProvider, long startTimeUs, long endTimeUs)Deprecated.Initializes the wrapper to output toTrackOutputs provided by the specifiedChunkExtractor.TrackOutputProvider, and configures the extractor to receive data from a new chunk.- Parameters:
trackOutputProvider- The provider ofTrackOutputs that will receive sample data.startTimeUs- The start position in the new chunk, orC.TIME_UNSETto output samples from the start of the chunk.endTimeUs- The end position in the new chunk, orC.TIME_UNSETto output samples to the end of the chunk.
-
release
void release()
Deprecated.Releases any held resources.
-
read
boolean read(ExtractorInput input) throws IOException
Deprecated.Reads from the givenExtractorInput.- Parameters:
input- The input to read from.- Returns:
- Whether there is any data left to extract. Returns false if the end of input has been reached.
- Throws:
IOException- If an error occurred reading from or parsing the input.
-
-