Class PassthroughSectionPayloadReader
- java.lang.Object
-
- com.google.android.exoplayer2.extractor.ts.PassthroughSectionPayloadReader
-
- All Implemented Interfaces:
SectionPayloadReader
public final class PassthroughSectionPayloadReader extends Object implements SectionPayloadReader
ASectionPayloadReader
that 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 void
consume(ParsableByteArray sectionData)
Called by aSectionReader
when a full section is received.void
init(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.sampleMimeType
on the created output track.
-
-
Method Detail
-
init
public void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)
Description copied from interface:SectionPayloadReader
Initializes the section payload reader.- Specified by:
init
in interfaceSectionPayloadReader
- Parameters:
timestampAdjuster
- A timestamp adjuster for offsetting and scaling sample timestamps.extractorOutput
- TheExtractorOutput
that receives the extracted data.idGenerator
- ATsPayloadReader.TrackIdGenerator
that generates unique track ids for theTrackOutput
s.
-
consume
public void consume(ParsableByteArray sectionData)
Description copied from interface:SectionPayloadReader
Called by aSectionReader
when a full section is received.- Specified by:
consume
in interfaceSectionPayloadReader
- Parameters:
sectionData
- The data belonging to a section starting from the table_id. If section_syntax_indicator is set to '1',sectionData
excludes the CRC_32 field. Otherwise, all bytes belonging to the table section are included.
-
-