Package com.google.android.exoplayer2.testutil

## Class FakeExtractorOutput

- java.lang.Object
- - com.google.android.exoplayer2.testutil.FakeExtractorOutput

- All Implemented Interfaces:
    `ExtractorOutput`, `Dumper.Dumpable`

      public final class FakeExtractorOutput
      extends Object
      implements ExtractorOutput, Dumper.Dumpable

  A fake `ExtractorOutput`.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `int` | `numberOfTracks` |
    `@MonotonicNonNull SeekMap` | `seekMap` |
    `SparseArray<FakeTrackOutput>` | `trackOutputs` |
    `boolean` | `tracksEnded` |

    - ### Fields inherited from interface com.google.android.exoplayer2.extractor.ExtractorOutput

      `PLACEHOLDER`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FakeExtractorOutput()` |
    `FakeExtractorOutput​(FakeTrackOutput.Factory trackOutputFactory)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clearTrackOutputs()` |
    `void` | `dump​(Dumper dumper)` | Dumps the fields of the object using the `dumper`.
    `void` | `endTracks()` | Called when all tracks have been identified, meaning no new `trackId` values will be passed to `ExtractorOutput.track(int, int)`.
    `void` | `seekMap​(SeekMap seekMap)` | Called when a `SeekMap` has been extracted from the stream.
    `FakeTrackOutput` | `track​(int id, int type)` | Called by the `Extractor` to get the `TrackOutput` for a specific track.

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

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

- - ### Field Detail

    - #### trackOutputs

          public final SparseArray<FakeTrackOutput> trackOutputs

    - #### numberOfTracks

          public int numberOfTracks

    - #### tracksEnded

          public boolean tracksEnded

    - #### seekMap

          public @MonotonicNonNull SeekMap seekMap

  - ### Constructor Detail

    - #### FakeExtractorOutput

          public FakeExtractorOutput()

    - #### FakeExtractorOutput

          public FakeExtractorOutput​(FakeTrackOutput.Factory trackOutputFactory)

  - ### Method Detail

    - #### track

          public FakeTrackOutput track​(int id,
                                       int type)

      Description copied from interface: `ExtractorOutput`
      Called by the `Extractor` to get the `TrackOutput` for a specific track.

      The same `TrackOutput` is returned if multiple calls are made with the same `id`.

      Specified by:
        `track` in interface `ExtractorOutput`
      Parameters:
        `id` - A track identifier.
        `type` - The `track type`.
      Returns:
        The `TrackOutput` for the given track identifier.

    - #### endTracks

          public void endTracks()

      Description copied from interface: `ExtractorOutput`
      Called when all tracks have been identified, meaning no new `trackId` values will be passed to `ExtractorOutput.track(int, int)`.
      Specified by:
        `endTracks` in interface `ExtractorOutput`

    - #### seekMap

          public void seekMap​(SeekMap seekMap)

      Description copied from interface: `ExtractorOutput`
      Called when a `SeekMap` has been extracted from the stream.
      Specified by:
        `seekMap` in interface `ExtractorOutput`
      Parameters:
        `seekMap` - The extracted `SeekMap`.

    - #### clearTrackOutputs

          public void clearTrackOutputs()

    - #### dump

          public void dump​(Dumper dumper)

      Description copied from interface: `Dumper.Dumpable`
      Dumps the fields of the object using the `dumper`.
      Specified by:
        `dump` in interface `Dumper.Dumpable`
      Parameters:
        `dumper` - The `Dumper` to be used to dump fields.