# MediaCodecVideoDecoderException

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/video/MediaCodecVideoDecoderException.java+class:androidx.media3.exoplayer.video.MediaCodecVideoDecoderException)

*** ** * ** ***


```
@UnstableApi
class MediaCodecVideoDecoderException : MediaCodecDecoderException
```

<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.decoder.DecoderException](https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderException) |||
|   |   |   | ↳ | [androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException) ||
|   |   |   |   | ↳ | [androidx.media3.exoplayer.video.MediaCodecVideoDecoderException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/MediaCodecVideoDecoderException) |

*** ** * ** ***

Thrown when a failure occurs in a `https://developer.android.com/reference/android/media/MediaCodec.html` video decoder.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/MediaCodecVideoDecoderException#MediaCodecVideoDecoderException(java.lang.Throwable,androidx.media3.exoplayer.mediacodec.MediaCodecInfo,android.view.Surface)( cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!, codecInfo: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo?, surface: https://developer.android.com/reference/android/view/Surface.html? )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/MediaCodecVideoDecoderException#isSurfaceValid()` Whether the surface was valid when the exception occurred. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/MediaCodecVideoDecoderException#surfaceIdentityHashCode()` The `https://developer.android.com/reference/java/lang/System.html#identityHashCode(java.lang.Object)` of the surface when the exception occurred. |

| ### 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()` | |

| ### Inherited properties |
|---|
| From [androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException) |---|---| | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException#codecInfo()` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo` of the decoder that failed. | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException#diagnosticInfo()` An optional developer-readable diagnostic information string. | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException#errorCode()` An optional error code reported by the codec. | |

## Public constructors

### MediaCodecVideoDecoderException

```
MediaCodecVideoDecoderException(
    cause: Throwable!,
    codecInfo: MediaCodecInfo?,
    surface: Surface?
)
```

## Public properties

### isSurfaceValid

```
val isSurfaceValid: Boolean
```

Whether the surface was valid when the exception occurred.

### surfaceIdentityHashCode

```
val surfaceIdentityHashCode: Int
```

The `https://developer.android.com/reference/java/lang/System.html#identityHashCode(java.lang.Object)` of the surface when the exception occurred.