Package com.castlabs.sdk.debug

# Class DebugMediaCodecAdapterFactory

java.lang.Object
com.castlabs.sdk.debug.DebugMediaCodecAdapterFactory

All Implemented Interfaces:
  `com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory`

public final class DebugMediaCodecAdapterFactory extends Object implements com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory
A `MediaCodecAdapter.Factory` that creates `DebugMediaCodecAdapterFactory.DebugMediaCodecAdapter` instances.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `DebugMediaCodecAdapterFactory.OnFrameRenderedListener`
  Listener for when a frame is rendered.

- ## Field Summary

  ### Fields inherited from interface com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory

  `DEFAULT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DebugMediaCodecAdapterFactory(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory delegate)`
  Creates a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.google.android.exoplayer2.mediacodec.MediaCodecAdapter`
  `createAdapter(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Configuration configuration)`
  `com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory`
  `getDelegate()`
  Returns the delegate `MediaCodecAdapter.Factory`.
  `void`
  `setOnFrameRenderedListener(DebugMediaCodecAdapterFactory.OnFrameRenderedListener onFrameRenderedListener)`
  Sets the listener for when a frame is rendered.

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

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

- ## Constructor Details

  - ### DebugMediaCodecAdapterFactory

    public DebugMediaCodecAdapterFactory(@NonNull com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory delegate)
    Creates a new instance.
    Parameters:
      `delegate` - The delegate `MediaCodecAdapter.Factory` to use.

- ## Method Details

  - ### setOnFrameRenderedListener

    public void setOnFrameRenderedListener(@Nullable DebugMediaCodecAdapterFactory.OnFrameRenderedListener onFrameRenderedListener)
    Sets the listener for when a frame is rendered.
    Parameters:
      `onFrameRenderedListener` - The listener to set.

  - ### createAdapter

    @NonNull public com.google.android.exoplayer2.mediacodec.MediaCodecAdapter createAdapter(@NonNull com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Configuration configuration) throws IOException
    Specified by:
      `createAdapter` in interface `com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory`
    Throws:
      `IOException`

  - ### getDelegate

    @NonNull public com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory getDelegate()
    Returns the delegate `MediaCodecAdapter.Factory`.
    Returns:
      The delegate `MediaCodecAdapter.Factory`.