PassthroughSectionPayloadReader


@UnstableApi
class PassthroughSectionPayloadReader : SectionPayloadReader


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

Timestamp adjustment is provided through subsampleOffsetUs.

Summary

Public constructors

Create a new PassthroughSectionPayloadReader.

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 constructors

PassthroughSectionPayloadReader

PassthroughSectionPayloadReader(mimeType: String!)

Create a new PassthroughSectionPayloadReader.

Parameters
mimeType: String!

The MIME type set as sampleMimeType on the created output track.

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.