Package com.google.android.exoplayer2.mediacodec

## Class MediaCodecRenderer.DecoderInitializationException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException

- All Implemented Interfaces:
    `Serializable`
  Enclosing class:
    MediaCodecRenderer

      public static class MediaCodecRenderer.DecoderInitializationException
      extends Exception

  Thrown when a failure occurs instantiating a decoder.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `MediaCodecInfo` | `codecInfo` | The `MediaCodecInfo` of the decoder that failed to initialize.
    `String` | `diagnosticInfo` | An optional developer-readable diagnostic information string.
    `MediaCodecRenderer.DecoderInitializationException` | `fallbackDecoderInitializationException` | If the decoder failed to initialize and another decoder being used as a fallback also failed to initialize, the `MediaCodecRenderer.DecoderInitializationException` for the fallback decoder.
    `String` | `mimeType` | The mime type for which a decoder was being initialized.
    `boolean` | `secureDecoderRequired` | Whether it was required that the decoder support a secure output path.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DecoderInitializationException​(Format format, Throwable cause, boolean secureDecoderRequired, int errorCode)` |
    `DecoderInitializationException​(Format format, Throwable cause, boolean secureDecoderRequired, MediaCodecInfo mediaCodecInfo)` |

  - ### Method Summary

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Field Detail

    - #### mimeType

          public final String mimeType

      The mime type for which a decoder was being initialized.

    - #### secureDecoderRequired

          public final boolean secureDecoderRequired

      Whether it was required that the decoder support a secure output path.

    - #### codecInfo

          @Nullable
          public final MediaCodecInfo codecInfo

      The `MediaCodecInfo` of the decoder that failed to initialize. Null if no suitable decoder was found.

    - #### diagnosticInfo

          @Nullable
          public final String diagnosticInfo

      An optional developer-readable diagnostic information string. May be null.

    - #### fallbackDecoderInitializationException

          @Nullable
          public final MediaCodecRenderer.DecoderInitializationException fallbackDecoderInitializationException

      If the decoder failed to initialize and another decoder being used as a fallback also failed to initialize, the `MediaCodecRenderer.DecoderInitializationException` for the fallback decoder. Null if there was no fallback decoder or no suitable decoders were found.

  - ### Constructor Detail

    - #### DecoderInitializationException

          public DecoderInitializationException​(Format format,
                                                @Nullable
                                                Throwable cause,
                                                boolean secureDecoderRequired,
                                                int errorCode)

    - #### DecoderInitializationException

          public DecoderInitializationException​(Format format,
                                                @Nullable
                                                Throwable cause,
                                                boolean secureDecoderRequired,
                                                MediaCodecInfo mediaCodecInfo)