Class H264Reader
- java.lang.Object
-
- com.google.android.exoplayer2.extractor.ts.H264Reader
-
- All Implemented Interfaces:
ElementaryStreamReader
@Deprecated public final class H264Reader 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 H264 byte stream and extracts individual frames.
-
-
Constructor Summary
Constructors Constructor Description H264Reader(SeiReader seiReader, boolean allowNonIdrKeyframes, boolean detectAccessUnits)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
consume(ParsableByteArray data)
Deprecated.Consumes (possibly partial) data from the current packet.void
createTracks(ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)
Deprecated.Initializes the reader by providing outputs and ids for the tracks.void
packetFinished()
Deprecated.Called when a packet ends.void
packetStarted(long pesTimeUs, @com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Flags int flags)
Deprecated.Called when a packet starts.void
seek()
Deprecated.Notifies the reader that a seek has occurred.
-
-
-
Constructor Detail
-
H264Reader
public H264Reader(SeiReader seiReader, boolean allowNonIdrKeyframes, boolean detectAccessUnits)
Deprecated.- Parameters:
seiReader
- An SEI reader for consuming closed caption channels.allowNonIdrKeyframes
- Whether to treat samples consisting of non-IDR I slices as synchronization samples (key-frames).detectAccessUnits
- Whether to split the input stream into access units (samples) based on slice headers. Passfalse
if the stream contains access unit delimiters (AUDs).
-
-
Method Detail
-
seek
public void seek()
Deprecated.Description copied from interface:ElementaryStreamReader
Notifies the reader that a seek has occurred.- Specified by:
seek
in interfaceElementaryStreamReader
-
createTracks
public void createTracks(ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)
Deprecated.Description copied from interface:ElementaryStreamReader
Initializes the reader by providing outputs and ids for the tracks.- Specified by:
createTracks
in interfaceElementaryStreamReader
- Parameters:
extractorOutput
- TheExtractorOutput
that receives the extracted data.idGenerator
- ATsPayloadReader.TrackIdGenerator
that generates unique track ids for theTrackOutput
s.
-
packetStarted
public void packetStarted(long pesTimeUs, @com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Flags int flags)
Deprecated.Description copied from interface:ElementaryStreamReader
Called when a packet starts.- Specified by:
packetStarted
in interfaceElementaryStreamReader
- Parameters:
pesTimeUs
- The timestamp associated with the packet.flags
- SeeTsPayloadReader.Flags
.
-
consume
public void consume(ParsableByteArray data)
Deprecated.Description copied from interface:ElementaryStreamReader
Consumes (possibly partial) data from the current packet.- Specified by:
consume
in interfaceElementaryStreamReader
- Parameters:
data
- The data to consume.
-
packetFinished
public void packetFinished()
Deprecated.Description copied from interface:ElementaryStreamReader
Called when a packet ends.- Specified by:
packetFinished
in interfaceElementaryStreamReader
-
-