PesReader
@UnstableApi
class PesReader : TsPayloadReader
Parses PES packet data and extracts samples.
Summary
Public constructors |
|---|
PesReader(reader: ElementaryStreamReader!) |
Public functions |
|
|---|---|
Boolean |
canConsumeSynthesizedEmptyPusi(isModeHls: Boolean)Determines if the parser can consume a synthesized empty pusi. |
Unit |
consume(data: ParsableByteArray!, @TsPayloadReader.Flags flags: Int)Consumes the payload of a TS packet. |
Unit |
init(Initializes the payload reader. |
Unit |
seek()Notifies the reader that a seek has occurred. |
Inherited Constants |
|---|
Public constructors
Public functions
canConsumeSynthesizedEmptyPusi
fun canConsumeSynthesizedEmptyPusi(isModeHls: Boolean): Boolean
Determines if the parser can consume a synthesized empty pusi.
| Parameters | |
|---|---|
isModeHls: Boolean |
|
consume
fun consume(data: ParsableByteArray!, @TsPayloadReader.Flags flags: Int): Unit
Consumes the payload of a TS packet.
| Parameters | |
|---|---|
data: ParsableByteArray! |
The TS packet. The position will be set to the start of the payload. |
@TsPayloadReader.Flags flags: Int |
See |
| Throws | |
|---|---|
androidx.media3.common.ParserException |
If the payload could not be parsed. |
init
fun init(
timestampAdjuster: TimestampAdjuster!,
extractorOutput: ExtractorOutput!,
idGenerator: TsPayloadReader.TrackIdGenerator!
): Unit
Initializes the payload reader.
| Parameters | |
|---|---|
timestampAdjuster: TimestampAdjuster! |
A timestamp adjuster for offsetting and scaling sample timestamps. |
extractorOutput: ExtractorOutput! |
The |
idGenerator: TsPayloadReader.TrackIdGenerator! |
A |