# CapturingImageOutput

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

*** ** * ** ***


```
@UnstableApi
public final class CapturingImageOutput implements Dumper.Dumpable, ImageOutput
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput` that captures image availability events.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/test/utils/CapturingImageOutput#CapturingImageOutput()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/CapturingImageOutput#dump(androidx.media3.test.utils.Dumper)(https://developer.android.com/reference/androidx/media3/test/utils/Dumper dumper)` Dumps the fields of the object using the `dumper`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/CapturingImageOutput#onDisabled()()` Called on the playback thread when the renderer is disabled. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/CapturingImageOutput#onImageAvailable(long,android.graphics.Bitmap)(long presentationTimeUs, https://developer.android.com/reference/android/graphics/Bitmap.html bitmap)` Called on the playback thread when a new image is available. |

| ### Inherited Constants |
|---|
| From [androidx.media3.exoplayer.image.ImageOutput](https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput) |---|---| | `static final https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput` | `https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput#NO_OP()` A no-op implementation of ImageOutput. | |

## Public constructors

### CapturingImageOutput

```
public CapturingImageOutput()
```

## Public methods

### dump

```
public void dump(Dumper dumper)
```

Dumps the fields of the object using the `dumper`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/test/utils/Dumper dumper` | The `https://developer.android.com/reference/androidx/media3/test/utils/Dumper` to be used to dump fields. |

### onDisabled

```
public void onDisabled()
```

Called on the playback thread when the renderer is disabled.

This method should have an implementation that runs fast.

### onImageAvailable

```
public void onImageAvailable(long presentationTimeUs, Bitmap bitmap)
```

Called on the playback thread when a new image is available.

This method should have an implementation that runs fast.

| Parameters |
|---|---|
| `long presentationTimeUs` | The presentation time of the image, in microseconds. This time is an offset from the start of the current `https://developer.android.com/reference/androidx/media3/common/Timeline.Period`. |
| `https://developer.android.com/reference/android/graphics/Bitmap.html bitmap` | The new image available. |