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

## Class PassthroughSectionPayloadReader

- java.lang.Object
- - com.google.android.exoplayer2.extractor.ts.PassthroughSectionPayloadReader

- All Implemented Interfaces:
    `SectionPayloadReader`

      public final class PassthroughSectionPayloadReader
      extends Object
      implements SectionPayloadReader

  A `SectionPayloadReader` that directly outputs the section bytes as sample data.

  Timestamp adjustment is provided through `Format.subsampleOffsetUs`.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PassthroughSectionPayloadReader​(String mimeType)` | Create a new PassthroughSectionPayloadReader.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `consume​(ParsableByteArray sectionData)` | Called by a `SectionReader` when a full section is received.
    `void` | `init​(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)` | Initializes the section payload reader.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### PassthroughSectionPayloadReader

          public PassthroughSectionPayloadReader​(String mimeType)

      Create a new PassthroughSectionPayloadReader.
      Parameters:
        `mimeType` - The MIME type set as `Format.sampleMimeType` on the created output track.

  - ### Method Detail

    - #### init

          public void init​(TimestampAdjuster timestampAdjuster,
                           ExtractorOutput extractorOutput,
                           TsPayloadReader.TrackIdGenerator idGenerator)

      Description copied from interface: `SectionPayloadReader`
      Initializes the section payload reader.
      Specified by:
        `init` in interface `SectionPayloadReader`
      Parameters:
        `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 `TrackOutput`s.

    - #### consume

          public void consume​(ParsableByteArray sectionData)

      Description copied from interface: `SectionPayloadReader`
      Called by a `SectionReader` when a full section is received.
      Specified by:
        `consume` in interface `SectionPayloadReader`
      Parameters:
        `sectionData` - The data belonging to a section starting from the table_id. If section_syntax_indicator is set to '1', `sectionData` excludes the CRC_32 field. Otherwise, all bytes belonging to the table section are included.