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