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

## Class DtsReader

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

- All Implemented Interfaces:
    `ElementaryStreamReader`

      public final class DtsReader
      extends Object
      implements ElementaryStreamReader

  Parses a continuous DTS byte stream and extracts individual samples.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DtsReader​(String language)` | Constructs a new reader for DTS elementary streams.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `consume​(ParsableByteArray data)` | Consumes (possibly partial) data from the current packet.
    `void` | `createTracks​(ExtractorOutput extractorOutput, TsPayloadReader.TrackIdGenerator idGenerator)` | Initializes the reader by providing outputs and ids for the tracks.
    `void` | `packetFinished()` | Called when a packet ends.
    `void` | `packetStarted​(long pesTimeUs, int flags)` | Called when a packet starts.
    `void` | `seek()` | 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

    - #### DtsReader

          public DtsReader​(@Nullable
                           String language)

      Constructs a new reader for DTS elementary streams.
      Parameters:
        `language` - Track language.

  - ### Method Detail

    - #### seek

          public void seek()

      Description copied from interface: `ElementaryStreamReader`
      Notifies the reader that a seek has occurred.
      Specified by:
        `seek` in interface `ElementaryStreamReader`

    - #### createTracks

          public void createTracks​(ExtractorOutput extractorOutput,
                                   TsPayloadReader.TrackIdGenerator idGenerator)

      Description copied from interface: `ElementaryStreamReader`
      Initializes the reader by providing outputs and ids for the tracks.
      Specified by:
        `createTracks` in interface `ElementaryStreamReader`
      Parameters:
        `extractorOutput` - The `ExtractorOutput` that receives the extracted data.
        `idGenerator` - A `TsPayloadReader.TrackIdGenerator` that generates unique track ids for the `TrackOutput`s.

    - #### packetStarted

          public void packetStarted​(long pesTimeUs,
                                    @Flags
                                    int flags)

      Description copied from interface: `ElementaryStreamReader`
      Called when a packet starts.
      Specified by:
        `packetStarted` in interface `ElementaryStreamReader`
      Parameters:
        `pesTimeUs` - The timestamp associated with the packet.
        `flags` - See `TsPayloadReader.Flags`.

    - #### consume

          public void consume​(ParsableByteArray data)

      Description copied from interface: `ElementaryStreamReader`
      Consumes (possibly partial) data from the current packet.
      Specified by:
        `consume` in interface `ElementaryStreamReader`
      Parameters:
        `data` - The data to consume.

    - #### packetFinished

          public void packetFinished()

      Description copied from interface: `ElementaryStreamReader`
      Called when a packet ends.
      Specified by:
        `packetFinished` in interface `ElementaryStreamReader`