Back to Exoplayer

ChunkExtractor (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/chunk/ChunkExtractor.html

latest6.0 KB
Original Source

Package com.google.android.exoplayer2.source.chunk

Interface ChunkExtractor

  • All Known Implementing Classes:BundledChunkExtractor, MediaParserChunkExtractor

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceChunkExtractor

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 track 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.

Nested Class Summary

Nested Classes | Modifier and Type | Interface | Description | | --- | --- | --- | | static interface | ChunkExtractor.Factory | Deprecated.

Creates ChunkExtractor instances. | | static interface | ChunkExtractor.TrackOutputProvider | Deprecated.

Provides TrackOutput instances to be written to during extraction. |

Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | ChunkIndex | getChunkIndex() | Deprecated.

Returns the ChunkIndex most recently obtained from the chunks, or null if a ChunkIndex has not been obtained. | | Format[] | getSampleFormats() | Deprecated.

Returns the sample Formats 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) | Deprecated.

Initializes the wrapper to output to TrackOutputs provided by the specified ChunkExtractor.TrackOutputProvider, and configures the extractor to receive data from a new chunk. | | boolean | read​(ExtractorInput input) | Deprecated.

Reads from the given ExtractorInput. | | void | release() | Deprecated.

Releases any held resources. |

Method Detail

- 

getChunkIndex

@Nullable[ChunkIndex](../../extractor/ChunkIndex.html "class in com.google.android.exoplayer2.extractor")getChunkIndex()

Deprecated.

Returns the ChunkIndex most recently obtained from the chunks, or null if a ChunkIndex has not been obtained.

- 

getSampleFormats

@Nullable[Format](../../Format.html "class in com.google.android.exoplayer2")[] getSampleFormats()

Deprecated.

Returns the sample Formats for the tracks identified by the extractor, or null if the extractor has not finished identifying tracks.

- 

init

void init​(@Nullable[ChunkExtractor.TrackOutputProvider](ChunkExtractor.TrackOutputProvider.html "interface in com.google.android.exoplayer2.source.chunk")trackOutputProvider,
          long startTimeUs,
          long endTimeUs)

Deprecated.

Initializes the wrapper to output to TrackOutputs provided by the specified ChunkExtractor.TrackOutputProvider, and configures the extractor to receive data from a new chunk. Parameters:trackOutputProvider - The provider of TrackOutputs 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.

- 

release

void release()

Deprecated.

Releases any held resources.

- 

read

boolean read​([ExtractorInput](../../extractor/ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input)
      throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")

Deprecated.

Reads from the given ExtractorInput. 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.