Package com.google.android.exoplayer2.testutil

## Class CapturingRenderersFactory

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

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

      public class CapturingRenderersFactory
      extends Object
      implements RenderersFactory, Dumper.Dumpable

  A `RenderersFactory` that captures interactions with the audio and video `MediaCodecAdapter` instances.

  The captured interactions can be used in a test assertion via the `Dumper.Dumpable` interface.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CapturingRenderersFactory​(Context context)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Renderer[]` | `createRenderers​(Handler eventHandler, VideoRendererEventListener videoRendererEventListener, AudioRendererEventListener audioRendererEventListener, TextOutput textRendererOutput, MetadataOutput metadataRendererOutput)` | Builds the `Renderer` instances for a `SimpleExoPlayer`.
    `void` | `dump​(Dumper dumper)` | Dumps the fields of the object using the `dumper`.

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

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

- - ### Constructor Detail

    - #### CapturingRenderersFactory

          public CapturingRenderersFactory​(Context context)

  - ### Method Detail

    - #### createRenderers

          public Renderer[] createRenderers​(Handler eventHandler,
                                            VideoRendererEventListener videoRendererEventListener,
                                            AudioRendererEventListener audioRendererEventListener,
                                            TextOutput textRendererOutput,
                                            MetadataOutput metadataRendererOutput)

      Description copied from interface: `RenderersFactory`
      Builds the `Renderer` instances for a `SimpleExoPlayer`.
      Specified by:
        `createRenderers` in interface `RenderersFactory`
      Parameters:
        `eventHandler` - A handler to use when invoking event listeners and outputs.
        `videoRendererEventListener` - An event listener for video renderers.
        `audioRendererEventListener` - An event listener for audio renderers.
        `textRendererOutput` - An output for text renderers.
        `metadataRendererOutput` - An output for metadata renderers.
      Returns:
        The `instances`.

    - #### 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.