public final class PesReader extends java.lang.Object implements TsPayloadReader
TsPayloadReader.DvbSubtitleInfo, TsPayloadReader.EsInfo, TsPayloadReader.Factory, TsPayloadReader.TrackIdGenerator| Constructor and Description |
|---|
PesReader(ElementaryStreamReader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(ParsableByteArray data,
boolean payloadUnitStartIndicator)
Consumes the payload of a TS packet.
|
void |
init(TimestampAdjuster timestampAdjuster,
ExtractorOutput extractorOutput,
TsPayloadReader.TrackIdGenerator idGenerator)
Initializes the payload reader.
|
void |
seek()
Notifies the reader that a seek has occurred.
|
public PesReader(ElementaryStreamReader reader)
public void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)
TsPayloadReaderinit in interface TsPayloadReadertimestampAdjuster - A timestamp adjuster for offsetting and scaling sample timestamps.extractorOutput - The ExtractorOutput that receives the extracted data.idGenerator - A PesReader.TrackIdGenerator that generates unique track ids for the
TrackOutputs.public final void seek()
TsPayloadReader
Following a call to this method, the data passed to the next invocation of
TsPayloadReader.consume(ParsableByteArray, boolean) will not be a continuation of the data that was
previously passed. Hence the reader should reset any internal state.
seek in interface TsPayloadReaderpublic final void consume(ParsableByteArray data, boolean payloadUnitStartIndicator) throws ParserException
TsPayloadReaderconsume in interface TsPayloadReaderdata - The TS packet. The position will be set to the start of the payload.payloadUnitStartIndicator - Whether payloadUnitStartIndicator was set on the TS packet.ParserException - If the payload could not be parsed.