Back to Exoplayer

DefaultTsPayloadReaderFactory (ExoPlayer library)

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

latest11.4 KB
Original Source

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

Class DefaultTsPayloadReaderFactory

  • java.lang.Object

    • com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory
  • All Implemented Interfaces:TsPayloadReader.Factory


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDefaultTsPayloadReaderFactoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[TsPayloadReader.Factory](TsPayloadReader.Factory.html "interface in com.google.android.exoplayer2.extractor.ts")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Default TsPayloadReader.Factory implementation.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static interface | DefaultTsPayloadReaderFactory.Flags | Deprecated.

Flags controlling elementary stream readers' behavior. |

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static int | FLAG_ALLOW_NON_IDR_KEYFRAMES | Deprecated.

When extracting H.264 samples, whether to treat samples consisting of non-IDR I slices as synchronization samples (key-frames). | | static int | FLAG_DETECT_ACCESS_UNITS | Deprecated.

When extracting H.264 samples, whether to split the input stream into access units (samples) based on slice headers. | | static int | FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS | Deprecated.

Sets whether HDMV DTS audio streams will be handled. | | static int | FLAG_IGNORE_AAC_STREAM | Deprecated.

Prevents the creation of AdtsReader and LatmReader instances. | | static int | FLAG_IGNORE_H264_STREAM | Deprecated.

Prevents the creation of H264Reader instances. | | static int | FLAG_IGNORE_SPLICE_INFO_STREAM | Deprecated.

Prevents the creation of SectionPayloadReaders for splice information sections (SCTE-35). | | static int | FLAG_OVERRIDE_CAPTION_DESCRIPTORS | Deprecated.

Whether the list of closedCaptionFormats passed to DefaultTsPayloadReaderFactory(int, List) should be used in spite of any closed captions service descriptors. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | DefaultTsPayloadReaderFactory() | Deprecated. | | DefaultTsPayloadReaderFactory​(@com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory.Flags int flags) | Deprecated. | | DefaultTsPayloadReaderFactory​(@com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory.Flags int flags, List<Format> closedCaptionFormats) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | SparseArray<TsPayloadReader> | createInitialPayloadReaders() | Deprecated.

Returns the initial mapping from PIDs to payload readers. | | TsPayloadReader | createPayloadReader​(int streamType, TsPayloadReader.EsInfo esInfo) | Deprecated.

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

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

FLAG_ALLOW_NON_IDR_KEYFRAMES

public static final int FLAG_ALLOW_NON_IDR_KEYFRAMES

Deprecated.

When extracting H.264 samples, whether to treat samples consisting of non-IDR I slices as synchronization samples (key-frames). See Also:Constant Field Values

- 

FLAG_IGNORE_AAC_STREAM

public static final int FLAG_IGNORE_AAC_STREAM

Deprecated.

Prevents the creation of AdtsReader and LatmReader instances. This flag should be enabled if the transport stream contains no packets for an AAC elementary stream that is declared in the PMT. See Also:Constant Field Values

- 

FLAG_IGNORE_H264_STREAM

public static final int FLAG_IGNORE_H264_STREAM

Deprecated.

Prevents the creation of H264Reader instances. This flag should be enabled if the transport stream contains no packets for an H.264 elementary stream that is declared in the PMT. See Also:Constant Field Values

- 

FLAG_DETECT_ACCESS_UNITS

public static final int FLAG_DETECT_ACCESS_UNITS

Deprecated.

When extracting H.264 samples, whether to split the input stream into access units (samples) based on slice headers. This flag should be disabled if the stream contains access unit delimiters (AUDs). See Also:Constant Field Values

- 

FLAG_IGNORE_SPLICE_INFO_STREAM

public static final int FLAG_IGNORE_SPLICE_INFO_STREAM

Deprecated.

Prevents the creation of SectionPayloadReaders for splice information sections (SCTE-35). See Also:Constant Field Values

- 

FLAG_OVERRIDE_CAPTION_DESCRIPTORS

public static final int FLAG_OVERRIDE_CAPTION_DESCRIPTORS

Deprecated.

Whether the list of closedCaptionFormats passed to DefaultTsPayloadReaderFactory(int, List) should be used in spite of any closed captions service descriptors. If this flag is disabled, closedCaptionFormats will be ignored if the PMT contains closed captions service descriptors. See Also:Constant Field Values

- 

FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS

public static final int FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS

Deprecated.

Sets whether HDMV DTS audio streams will be handled. If this flag is set, SCTE subtitles will not be detected, as they share the same elementary stream type as HDMV DTS. See Also:Constant Field Values

Constructor Detail

- 

DefaultTsPayloadReaderFactory

public DefaultTsPayloadReaderFactory()

Deprecated.

- 

DefaultTsPayloadReaderFactory

public DefaultTsPayloadReaderFactory​(@com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory.Flags int flags)

Deprecated. Parameters:flags - A combination of FLAG_* values that control the behavior of the created readers.

- 

DefaultTsPayloadReaderFactory

public DefaultTsPayloadReaderFactory​(@com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory.Flags int flags,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Format](../../Format.html "class in com.google.android.exoplayer2")> closedCaptionFormats)

Deprecated. Parameters:flags - A combination of FLAG_* values that control the behavior of the created readers.closedCaptionFormats - Formats to be exposed by payload readers for streams with embedded closed captions when no caption service descriptors are provided. If FLAG_OVERRIDE_CAPTION_DESCRIPTORS is set, closedCaptionFormats overrides any descriptor information. If not set, and closedCaptionFormats is empty, a closed caption track with Format.accessibilityChannel Format.NO_VALUE will be exposed.

Method Detail

- 

createInitialPayloadReaders

public[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()

Deprecated.

Description copied from interface: TsPayloadReader.Factory

Returns the initial mapping from PIDs to payload readers.

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

Specified by:createInitialPayloadReaders in interface TsPayloadReader.FactoryReturns:A SparseArray that maps PIDs to payload readers.

- 

createPayloadReader

@Nullable
public[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)

Deprecated.

Description copied from interface: TsPayloadReader.Factory

Returns a TsPayloadReader for a given stream type and elementary stream information. May return null if the stream type is not supported. Specified by:createPayloadReader in interface TsPayloadReader.FactoryParameters: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.