Back to Exoplayer

TsPayloadReader.Factory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/extractor/ts/TsPayloadReader.Factory.html

latest2.6 KB
Original Source

Package com.google.android.exoplayer2.extractor.ts

Interface TsPayloadReader.Factory

  • All Known Implementing Classes:DefaultTsPayloadReaderFactoryEnclosing interface:TsPayloadReader

public static interfaceTsPayloadReader.Factory

Factory of TsPayloadReader instances.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | SparseArray<TsPayloadReader> | createInitialPayloadReaders() | Returns the initial mapping from PIDs to payload readers. | | TsPayloadReader | createPayloadReader​(int streamType, TsPayloadReader.EsInfo esInfo) | Returns a TsPayloadReader for a given stream type and elementary stream information. |

Method Detail

- 

createInitialPayloadReaders

[SparseArray](https://developer.android.com/reference/android/util/SparseArray.html "class or interface in android.util")<[TsPayloadReader](TsPayloadReader.html "interface in com.google.android.exoplayer2.extractor.ts")> createInitialPayloadReaders()

Returns the initial mapping from PIDs to payload readers.

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

Returns:A SparseArray that maps PIDs to payload readers.

- 

createPayloadReader

@Nullable[TsPayloadReader](TsPayloadReader.html "interface in com.google.android.exoplayer2.extractor.ts")createPayloadReader​(int streamType,[TsPayloadReader.EsInfo](TsPayloadReader.EsInfo.html "class in com.google.android.exoplayer2.extractor.ts")esInfo)

Returns a TsPayloadReader for a given stream type and elementary stream information. May return null if the stream type is not supported. Parameters:streamType - Stream type value as defined in the PMT entry or associated descriptors.esInfo - Information associated to the elementary stream provided in the PMT.Returns:A TsPayloadReader for the packet stream carried by the provided pid, or null if the stream is not supported.