Class PassthroughSectionPayloadReader
- java.lang.Object
-
- com.google.android.exoplayer2.extractor.ts.PassthroughSectionPayloadReader
-
- All Implemented Interfaces:
SectionPayloadReader
public final class PassthroughSectionPayloadReader extends Object implements SectionPayloadReader
ASectionPayloadReaderthat directly outputs the section bytes as sample data.Timestamp adjustment is provided through
Format.subsampleOffsetUs.
-
-
Constructor Summary
Constructors Constructor Description PassthroughSectionPayloadReader(String mimeType)Create a new PassthroughSectionPayloadReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume(ParsableByteArray sectionData)Called by aSectionReaderwhen a full section is received.voidinit(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)Initializes the section payload reader.
-
-
-
Constructor Detail
-
PassthroughSectionPayloadReader
public PassthroughSectionPayloadReader(String mimeType)
Create a new PassthroughSectionPayloadReader.- Parameters:
mimeType- The MIME type set asFormat.sampleMimeTypeon the created output track.
-
-
Method Detail
-
init
public void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)
Description copied from interface:SectionPayloadReaderInitializes the section payload reader.- Specified by:
initin interfaceSectionPayloadReader- 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.
-
consume
public void consume(ParsableByteArray sectionData)
Description copied from interface:SectionPayloadReaderCalled by aSectionReaderwhen a full section is received.- Specified by:
consumein interfaceSectionPayloadReader- Parameters:
sectionData- The data belonging to a section starting from the table_id. If section_syntax_indicator is set to '1',sectionDataexcludes the CRC_32 field. Otherwise, all bytes belonging to the table section are included.
-
-