SectionPayloadReader

@UnstableApi
interface SectionPayloadReader

Known direct subclasses
PassthroughSectionPayloadReader

A SectionPayloadReader that directly outputs the section bytes as sample data.


Reads section data.

Summary

Public functions

Unit
consume(sectionData: ParsableByteArray!)

Called by a SectionReader when a full section is received.

Unit
init(
    timestampAdjuster: TimestampAdjuster!,
    extractorOutput: ExtractorOutput!,
    idGenerator: TsPayloadReader.TrackIdGenerator!
)

Initializes the section payload reader.

Public functions

consume

fun consume(sectionData: ParsableByteArray!): Unit

Called by a SectionReader when a full section is received.

Parameters
sectionData: ParsableByteArray!

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.

init

fun init(
    timestampAdjuster: TimestampAdjuster!,
    extractorOutput: ExtractorOutput!,
    idGenerator: TsPayloadReader.TrackIdGenerator!
): Unit

Initializes the section payload reader.

Parameters
timestampAdjuster: TimestampAdjuster!

A timestamp adjuster for offsetting and scaling sample timestamps.

extractorOutput: ExtractorOutput!

The ExtractorOutput that receives the extracted data.

idGenerator: TsPayloadReader.TrackIdGenerator!

A PesReader.TrackIdGenerator that generates unique track ids for the TrackOutputs.