Class SectionReader
- java.lang.Object
-
- com.google.android.exoplayer2.extractor.ts.SectionReader
-
- All Implemented Interfaces:
TsPayloadReader
public final class SectionReader extends Object implements TsPayloadReader
Reads section data packets and feeds the whole sections to a givenSectionPayloadReader. Useful information on PSI sections can be found in ISO/IEC 13818-1, section 2.4.4.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.extractor.ts.TsPayloadReader
TsPayloadReader.DvbSubtitleInfo, TsPayloadReader.EsInfo, TsPayloadReader.Factory, TsPayloadReader.Flags, TsPayloadReader.TrackIdGenerator
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.extractor.ts.TsPayloadReader
FLAG_DATA_ALIGNMENT_INDICATOR, FLAG_PAYLOAD_UNIT_START_INDICATOR, FLAG_RANDOM_ACCESS_INDICATOR
-
-
Constructor Summary
Constructors Constructor Description SectionReader(SectionPayloadReader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume(ParsableByteArray data, int flags)Consumes the payload of a TS packet.voidinit(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)Initializes the payload reader.voidseek()Notifies the reader that a seek has occurred.
-
-
-
Constructor Detail
-
SectionReader
public SectionReader(SectionPayloadReader reader)
-
-
Method Detail
-
init
public void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)
Description copied from interface:TsPayloadReaderInitializes the payload reader.- Specified by:
initin interfaceTsPayloadReader- Parameters:
timestampAdjuster- A timestamp adjuster for offsetting and scaling sample timestamps.extractorOutput- TheExtractorOutputthat receives the extracted data.idGenerator- ATsPayloadReader.TrackIdGeneratorthat generates unique track ids for theTrackOutputs.
-
seek
public void seek()
Description copied from interface:TsPayloadReaderNotifies the reader that a seek has occurred.Following a call to this method, the data passed to the next invocation of
TsPayloadReader.consume(com.google.android.exoplayer2.util.ParsableByteArray, int)will not be a continuation of the data that was previously passed. Hence the reader should reset any internal state.- Specified by:
seekin interfaceTsPayloadReader
-
consume
public void consume(ParsableByteArray data, @Flags int flags)
Description copied from interface:TsPayloadReaderConsumes the payload of a TS packet.- Specified by:
consumein interfaceTsPayloadReader- Parameters:
data- The TS packet. The position will be set to the start of the payload.flags- SeeTsPayloadReader.Flags.
-
-