# VideoFrameProcessingException

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

*** ** * ** ***


```
@UnstableApi
public final class VideoFrameProcessingException extends Exception
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||
|   |   | ↳ | [androidx.media3.common.VideoFrameProcessingException](https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException) |

*** ** * ** ***

Thrown when an exception occurs while preparing an `https://developer.android.com/reference/androidx/media3/common/Effect`, or applying an `https://developer.android.com/reference/androidx/media3/common/Effect` to video frames.

## Summary

| ### Public fields |
|---|---|
| `final long` | `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#presentationTimeUs()` The microsecond timestamp of the frame being processed while the exception occurred or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if unknown. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#VideoFrameProcessingException(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html cause)` Creates an instance. |
| `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#VideoFrameProcessingException(java.lang.String)(https://developer.android.com/reference/java/lang/String.html message)` Creates an instance. |
| `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#VideoFrameProcessingException(java.lang.Throwable,long)(https://developer.android.com/reference/java/lang/Throwable.html cause, long presentationTimeUs)` Creates an instance. |
| `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#VideoFrameProcessingException(java.lang.String,java.lang.Throwable)(https://developer.android.com/reference/java/lang/String.html message, https://developer.android.com/reference/java/lang/Throwable.html cause)` Creates an instance. |
| `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#VideoFrameProcessingException(java.lang.String,long)(https://developer.android.com/reference/java/lang/String.html message, long presentationTimeUs)` Creates an instance. |
| `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#VideoFrameProcessingException(java.lang.String,java.lang.Throwable,long)( https://developer.android.com/reference/java/lang/String.html message, https://developer.android.com/reference/java/lang/Throwable.html cause, long presentationTimeUs )` Creates an instance. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException` | `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#from(java.lang.Exception)(https://developer.android.com/reference/java/lang/Exception.html exception)` Wraps the given exception in a `VideoFrameProcessingException` if it is not already a `VideoFrameProcessingException` and returns the exception otherwise. |
| `static https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException` | `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException#from(java.lang.Exception,long)(https://developer.android.com/reference/java/lang/Exception.html exception, long presentationTimeUs)` Wraps the given exception in a `VideoFrameProcessingException` with the given timestamp if it is not already a `VideoFrameProcessingException` and returns the exception otherwise. |

### Inherited methods

From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) `synchronized final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html exception)` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` `StackTraceElement[]` `https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `synchronized final Throwable[]` `https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(StackTraceElement[] stackTrace)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#toString()()`

## Public fields

### presentationTimeUs

```
public final long presentationTimeUs
```

The microsecond timestamp of the frame being processed while the exception occurred or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if unknown.

## Public constructors

### VideoFrameProcessingException

```
public VideoFrameProcessingException(Throwable cause)
```

Creates an instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/Throwable.html cause` | The cause of this exception. |

### VideoFrameProcessingException

```
public VideoFrameProcessingException(String message)
```

Creates an instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html message` | The detail message for this exception. |

### VideoFrameProcessingException

```
public VideoFrameProcessingException(Throwable cause, long presentationTimeUs)
```

Creates an instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/Throwable.html cause` | The cause of this exception. |
| `long presentationTimeUs` | The timestamp of the frame for which the exception occurred. |

### VideoFrameProcessingException

```
public VideoFrameProcessingException(String message, Throwable cause)
```

Creates an instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html message` | The detail message for this exception. |
| `https://developer.android.com/reference/java/lang/Throwable.html cause` | The cause of this exception. |

### VideoFrameProcessingException

```
public VideoFrameProcessingException(String message, long presentationTimeUs)
```

Creates an instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html message` | The detail message for this exception. |
| `long presentationTimeUs` | The timestamp of the frame for which the exception occurred. |

### VideoFrameProcessingException

```
public VideoFrameProcessingException(
    String message,
    Throwable cause,
    long presentationTimeUs
)
```

Creates an instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html message` | The detail message for this exception. |
| `https://developer.android.com/reference/java/lang/Throwable.html cause` | The cause of this exception. |
| `long presentationTimeUs` | The timestamp of the frame for which the exception occurred. |

## Public methods

### from

```
public static VideoFrameProcessingException from(Exception exception)
```

Wraps the given exception in a `VideoFrameProcessingException` if it is not already a `VideoFrameProcessingException` and returns the exception otherwise.

### from

```
public static VideoFrameProcessingException from(Exception exception, long presentationTimeUs)
```

Wraps the given exception in a `VideoFrameProcessingException` with the given timestamp if it is not already a `VideoFrameProcessingException` and returns the exception otherwise.