# CapturingImageOutput

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/CapturingImageOutput "View this page in Java")

<br />

```
@UnstableApi
class CapturingImageOutput : Dumper.Dumpable, ImageOutput
```

<br />

*** ** * ** ***

A[ImageOutput](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/image/ImageOutput)that captures image availability events.

## Summary

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

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [dump](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/CapturingImageOutput#dump(androidx.media3.test.utils.Dumper))`(dumper: `[Dumper](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/Dumper)`!)` Dumps the fields of the object using the`dumper`.                                                                                                                        |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onDisabled](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/CapturingImageOutput#onDisabled())`()` Called on the playback thread when the renderer is disabled.                                                                                                                                                                                                                                       |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onImageAvailable](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/CapturingImageOutput#onImageAvailable(long,android.graphics.Bitmap))`(presentationTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`, bitmap: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`!)` Called on the playback thread when a new image is available. |

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

## Public constructors

### CapturingImageOutput

```
CapturingImageOutput()
```  

## Public functions

### dump

```
fun dump(dumper: Dumper!): Unit
```

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

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

### onDisabled

```
fun onDisabled(): Unit
```

Called on the playback thread when the renderer is disabled.

This method should have an implementation that runs fast.  

### onImageAvailable

```
fun onImageAvailable(presentationTimeUs: Long, bitmap: Bitmap!): Unit
```

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

This method should have an implementation that runs fast.  

|                                             Parameters                                              |
|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `presentationTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | The presentation time of the image, in microseconds. This time is an offset from the start of the current[Timeline.Period](https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline.Period). |
| `bitmap: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`!`         | The new image available.                                                                                                                                                                                           |