# MediaCodecRenderer.DecoderInitializationException

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.java+class:androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.DecoderInitializationException)

*** ** * ** ***


```
class MediaCodecRenderer.DecoderInitializationException : Exception
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||
|   |   | ↳ | [androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.DecoderInitializationException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException) |

*** ** * ** ***

Thrown when a failure occurs instantiating a decoder.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException#DecoderInitializationException(androidx.media3.common.Format,java.lang.Throwable,boolean,int)( format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!, cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?, secureDecoderRequired: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, errorCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException#DecoderInitializationException(androidx.media3.common.Format,java.lang.Throwable,boolean,androidx.media3.exoplayer.mediacodec.MediaCodecInfo)( format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!, cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?, secureDecoderRequired: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, mediaCodecInfo: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo! )` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException#codecInfo()` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo` of the decoder that failed to initialize. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException#diagnosticInfo()` An optional developer-readable diagnostic information string. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException#fallbackDecoderInitializationException()` If the decoder failed to initialize and another decoder being used as a fallback also failed to initialize, the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException` for the fallback decoder. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException#mimeType()` The MIME type for which a decoder was being initialized. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException#secureDecoderRequired()` Whether it was required that the decoder support a secure output path. |

| ### Inherited functions |
|---|
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-suppressed.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/set-stack-trace.html(stackTrace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()` | |

## Public constructors

### DecoderInitializationException

```
DecoderInitializationException(
    format: Format!,
    cause: Throwable?,
    secureDecoderRequired: Boolean,
    errorCode: Int
)
```

### DecoderInitializationException

```
DecoderInitializationException(
    format: Format!,
    cause: Throwable?,
    secureDecoderRequired: Boolean,
    mediaCodecInfo: MediaCodecInfo!
)
```

## Public properties

### codecInfo

```
val codecInfo: MediaCodecInfo?
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo` of the decoder that failed to initialize. Null if no suitable decoder was found.

### diagnosticInfo

```
val diagnosticInfo: String?
```

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

### fallbackDecoderInitializationException

```
val fallbackDecoderInitializationException: MediaCodecRenderer.DecoderInitializationException?
```

If the decoder failed to initialize and another decoder being used as a fallback also failed to initialize, the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.DecoderInitializationException` for the fallback decoder. Null if there was no fallback decoder or no suitable decoders were found.

### mimeType

```
val mimeType: String?
```

The MIME type for which a decoder was being initialized.

### secureDecoderRequired

```
val secureDecoderRequired: Boolean
```

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