Back to Exoplayer

SectionReader (ExoPlayer library)

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

latest5.6 KB
Original Source

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

Class SectionReader

  • java.lang.Object

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


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classSectionReaderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[TsPayloadReader](TsPayloadReader.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.

Reads section data packets and feeds the whole sections to a given SectionPayloadReader. Useful information on PSI sections can be found in ISO/IEC 13818-1, section 2.4.4.

Nested Class Summary

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.extractor.ts.TsPayloadReader

TsPayloadReader.DvbSubtitleInfo, TsPayloadReader.EsInfo, TsPayloadReader.Factory, TsPayloadReader.Flags, TsPayloadReader.TrackIdGenerator

Field Summary

- 

Fields inherited from interface com.google.android.exoplayer2.extractor.ts.TsPayloadReader

FLAG_DATA_ALIGNMENT_INDICATOR, FLAG_PAYLOAD_UNIT_START_INDICATOR, FLAG_RANDOM_ACCESS_INDICATOR

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | SectionReader​(SectionPayloadReader reader) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | consume​(ParsableByteArray data, @com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Flags int flags) | Deprecated.

Consumes the payload of a TS packet. | | void | init​(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator) | Deprecated.

Initializes the payload reader. | | void | seek() | Deprecated.

Notifies the reader that a seek has occurred. |

- 

Methods inherited from class java.lang.Object

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

Constructor Detail

- 

SectionReader

public SectionReader​([SectionPayloadReader](SectionPayloadReader.html "interface in com.google.android.exoplayer2.extractor.ts")reader)

Deprecated.

Method Detail

- 

init

public void init​([TimestampAdjuster](../../util/TimestampAdjuster.html "class in com.google.android.exoplayer2.util")timestampAdjuster,[ExtractorOutput](../ExtractorOutput.html "interface in com.google.android.exoplayer2.extractor")extractorOutput,[TsPayloadReader.TrackIdGenerator](TsPayloadReader.TrackIdGenerator.html "class in com.google.android.exoplayer2.extractor.ts")idGenerator)

Deprecated.

Description copied from interface: TsPayloadReader

Initializes the payload reader. Specified by:init in interface TsPayloadReaderParameters:timestampAdjuster - A timestamp adjuster for offsetting and scaling sample timestamps.extractorOutput - The ExtractorOutput that receives the extracted data.idGenerator - A TsPayloadReader.TrackIdGenerator that generates unique track ids for the TrackOutputs.

- 

seek

public void seek()

Deprecated.

Description copied from interface: TsPayloadReader

Notifies the reader that a seek has occurred.

Following a call to this method, the data passed to the next invocation of TsPayloadReader.consume(com.google.android.exoplayer2.util.ParsableByteArray, @com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Flags int) will not be a continuation of the data that was previously passed. Hence the reader should reset any internal state.

Specified by:seek in interface TsPayloadReader

- 

consume

public void consume​([ParsableByteArray](../../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")data,
                    @com.google.android.exoplayer2.extractor.ts.TsPayloadReader.Flags int flags)

Deprecated.

Description copied from interface: TsPayloadReader

Consumes the payload of a TS packet. Specified by:consume in interface TsPayloadReaderParameters:data - The TS packet. The position will be set to the start of the payload.flags - See TsPayloadReader.Flags.