Class MediaParserChunkExtractor
- java.lang.Object
-
- com.google.android.exoplayer2.source.chunk.MediaParserChunkExtractor
-
- All Implemented Interfaces:
ChunkExtractor
@RequiresApi(30) @Deprecated public final class MediaParserChunkExtractor extends Object implements 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.ChunkExtractorimplemented on top of the platform'sMediaParser.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.source.chunk.ChunkExtractor
ChunkExtractor.Factory, ChunkExtractor.TrackOutputProvider
-
-
Field Summary
Fields Modifier and Type Field Description static ChunkExtractor.FactoryFACTORYDeprecated.
-
Constructor Summary
Constructors Constructor Description MediaParserChunkExtractor(@com.google.android.exoplayer2.C.TrackType int primaryTrackType, Format manifestFormat, List<Format> closedCaptionFormats, PlayerId playerId)Deprecated.Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
FACTORY
public static final ChunkExtractor.Factory FACTORY
Deprecated.
-
-
Constructor Detail
-
MediaParserChunkExtractor
public MediaParserChunkExtractor(@com.google.android.exoplayer2.C.TrackType int primaryTrackType, Format manifestFormat, List<Format> closedCaptionFormats, PlayerId playerId)Deprecated.Creates a new instance.- Parameters:
primaryTrackType- Thetypeof the primary track.C.TRACK_TYPE_NONEif there is no primary track.manifestFormat- The chunksFormatas obtained from the manifest.closedCaptionFormats- A list containing theFormatsof the closed-caption tracks in the chunks.playerId- ThePlayerIdof the player this chunk extractor is used for.
-
-
Method Detail
-
init
public void init(@Nullable ChunkExtractor.TrackOutputProvider trackOutputProvider, long startTimeUs, long endTimeUs)Deprecated.Description copied from interface:ChunkExtractorInitializes the wrapper to output toTrackOutputs provided by the specifiedChunkExtractor.TrackOutputProvider, and configures the extractor to receive data from a new chunk.- Specified by:
initin interfaceChunkExtractor- 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
public void release()
Deprecated.Description copied from interface:ChunkExtractorReleases any held resources.- Specified by:
releasein interfaceChunkExtractor
-
read
public boolean read(ExtractorInput input) throws IOException
Deprecated.Description copied from interface:ChunkExtractorReads from the givenExtractorInput.- Specified by:
readin interfaceChunkExtractor- 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.
-
getChunkIndex
@Nullable public ChunkIndex getChunkIndex()
Deprecated.Description copied from interface:ChunkExtractorReturns theChunkIndexmost recently obtained from the chunks, or null if aChunkIndexhas not been obtained.- Specified by:
getChunkIndexin interfaceChunkExtractor
-
getSampleFormats
@Nullable public Format[] getSampleFormats()
Deprecated.Description copied from interface:ChunkExtractorReturns the sampleFormats for the tracks identified by the extractor, or null if the extractor has not finished identifying tracks.- Specified by:
getSampleFormatsin interfaceChunkExtractor
-
-