TsPayloadReader
@UnstableApi
interface TsPayloadReader
PesReader |
Parses PES packet data and extracts samples. |
SectionReader |
Reads section data packets and feeds the whole sections to a given |
Parses TS packet payload data.
Summary
Nested types |
|---|
|
Holds information about a DVB subtitle, as defined in ETSI EN 300 468 V1.11.1 section 6.2.41. |
class TsPayloadReader.EsInfoHolds information associated with a PMT entry. |
@DocumentedThe audio type of the stream, as defined by ISO/IEC 13818-1, section 2.6.18. |
interface TsPayloadReader.FactoryFactory of |
@DocumentedContextual flags indicating the presence of indicators in the TS packet or PES packet headers. |
|
Generates track ids for initializing |
Constants |
|
|---|---|
const Int |
Indicates the presence of the data_alignment_indicator in the PES header. |
const Int |
Indicates the presence of the payload_unit_start_indicator in the TS packet header. |
const Int |
Indicates the presence of the random_access_indicator in the TS packet header adaptation field. |
Public functions |
|
|---|---|
Unit |
consume(data: ParsableByteArray!, @TsPayloadReader.Flags flags: Int)Consumes the payload of a TS packet. |
Unit |
init(Initializes the payload reader. |
Unit |
seek()Notifies the reader that a seek has occurred. |
Constants
FLAG_DATA_ALIGNMENT_INDICATOR
const val FLAG_DATA_ALIGNMENT_INDICATOR = 4: Int
Indicates the presence of the data_alignment_indicator in the PES header.
FLAG_PAYLOAD_UNIT_START_INDICATOR
const val FLAG_PAYLOAD_UNIT_START_INDICATOR = 1: Int
Indicates the presence of the payload_unit_start_indicator in the TS packet header.
FLAG_RANDOM_ACCESS_INDICATOR
const val FLAG_RANDOM_ACCESS_INDICATOR = 2: Int
Indicates the presence of the random_access_indicator in the TS packet header adaptation field.
Public functions
consume
fun consume(data: ParsableByteArray!, @TsPayloadReader.Flags flags: Int): Unit
Consumes the payload of a TS packet.
| Parameters | |
|---|---|
data: ParsableByteArray! |
The TS packet. The position will be set to the start of the payload. |
@TsPayloadReader.Flags flags: Int |
See |
| Throws | |
|---|---|
androidx.media3.common.ParserException |
If the payload could not be parsed. |
init
fun init(
timestampAdjuster: TimestampAdjuster!,
extractorOutput: ExtractorOutput!,
idGenerator: TsPayloadReader.TrackIdGenerator!
): Unit
Initializes the payload reader.
| Parameters | |
|---|---|
timestampAdjuster: TimestampAdjuster! |
A timestamp adjuster for offsetting and scaling sample timestamps. |
extractorOutput: ExtractorOutput! |
The |
idGenerator: TsPayloadReader.TrackIdGenerator! |
A |