TsPayloadReader.Factory


public interface TsPayloadReader.Factory


Factory of TsPayloadReader instances.

Summary

Public methods

abstract SparseArray<TsPayloadReader>

Returns the initial mapping from PIDs to payload readers.

abstract @Nullable TsPayloadReader
createPayloadReader(int streamType, TsPayloadReader.EsInfo esInfo)

Returns a TsPayloadReader for a given stream type and elementary stream information.

Public methods

createInitialPayloadReaders

abstract SparseArray<TsPayloadReadercreateInitialPayloadReaders()

Returns the initial mapping from PIDs to payload readers.

This method allows the injection of payload readers for reserved PIDs, excluding PID 0.

Returns
SparseArray<TsPayloadReader>

A SparseArray that maps PIDs to payload readers.

createPayloadReader

abstract @Nullable TsPayloadReader createPayloadReader(int streamType, TsPayloadReader.EsInfo esInfo)

Returns a TsPayloadReader for a given stream type and elementary stream information. May return null if the stream type is not supported.

Parameters
int streamType

Stream type value as defined in the PMT entry or associated descriptors.

TsPayloadReader.EsInfo esInfo

Information associated to the elementary stream provided in the PMT.

Returns
@Nullable TsPayloadReader

A TsPayloadReader for the packet stream carried by the provided pid, or null if the stream is not supported.