Class AdtsReader
- java.lang.Object
-
- com.google.android.exoplayer2.extractor.ts.AdtsReader
-
- All Implemented Interfaces:
ElementaryStreamReader
@Deprecated public final class AdtsReader extends Object implements ElementaryStreamReader
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.Parses a continuous ADTS byte stream and extracts individual frames.
-
-
Constructor Summary
Constructors Constructor Description AdtsReader(boolean exposeId3)Deprecated.AdtsReader(boolean exposeId3, String language)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidconsume(ParsableByteArray data)Deprecated.Consumes (possibly partial) data from the current packet.voidcreateTracks(ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)Deprecated.Initializes the reader by providing outputs and ids for the tracks.longgetSampleDurationUs()Deprecated.Returns the duration in microseconds per sample, orC.TIME_UNSETif the sample duration is not available.static booleanisAdtsSyncWord(int candidateSyncWord)Deprecated.Returns whether an integer matches an ADTS SYNC word.voidpacketFinished()Deprecated.Called when a packet ends.voidpacketStarted(long pesTimeUs, @com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Flags int flags)Deprecated.Called when a packet starts.voidseek()Deprecated.Notifies the reader that a seek has occurred.
-
-
-
Constructor Detail
-
AdtsReader
public AdtsReader(boolean exposeId3)
Deprecated.- Parameters:
exposeId3- True if the reader should expose ID3 information.
-
AdtsReader
public AdtsReader(boolean exposeId3, @Nullable String language)Deprecated.- Parameters:
exposeId3- True if the reader should expose ID3 information.language- Track language.
-
-
Method Detail
-
isAdtsSyncWord
public static boolean isAdtsSyncWord(int candidateSyncWord)
Deprecated.Returns whether an integer matches an ADTS SYNC word.
-
seek
public void seek()
Deprecated.Description copied from interface:ElementaryStreamReaderNotifies the reader that a seek has occurred.- Specified by:
seekin interfaceElementaryStreamReader
-
createTracks
public void createTracks(ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)
Deprecated.Description copied from interface:ElementaryStreamReaderInitializes the reader by providing outputs and ids for the tracks.- Specified by:
createTracksin interfaceElementaryStreamReader- Parameters:
extractorOutput- TheExtractorOutputthat receives the extracted data.idGenerator- ATsPayloadReader.TrackIdGeneratorthat generates unique track ids for theTrackOutputs.
-
packetStarted
public void packetStarted(long pesTimeUs, @com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Flags int flags)Deprecated.Description copied from interface:ElementaryStreamReaderCalled when a packet starts.- Specified by:
packetStartedin interfaceElementaryStreamReader- Parameters:
pesTimeUs- The timestamp associated with the packet.flags- SeeTsPayloadReader.Flags.
-
consume
public void consume(ParsableByteArray data) throws ParserException
Deprecated.Description copied from interface:ElementaryStreamReaderConsumes (possibly partial) data from the current packet.- Specified by:
consumein interfaceElementaryStreamReader- Parameters:
data- The data to consume.- Throws:
ParserException- If the data could not be parsed.
-
packetFinished
public void packetFinished()
Deprecated.Description copied from interface:ElementaryStreamReaderCalled when a packet ends.- Specified by:
packetFinishedin interfaceElementaryStreamReader
-
getSampleDurationUs
public long getSampleDurationUs()
Deprecated.Returns the duration in microseconds per sample, orC.TIME_UNSETif the sample duration is not available.
-
-