# VideoFrameProcessorTestRunner.Builder

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/VideoFrameProcessorTestRunner.java+class:androidx.media3.test.utils.VideoFrameProcessorTestRunner.Builder)

*** ** * ** ***


```
class VideoFrameProcessorTestRunner.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#Builder()()` Creates a new instance with default values. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner!` | `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#build()()` |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setBitmapReader(androidx.media3.test.utils.VideoFrameProcessorTestRunner.BitmapReader)( bitmapReader: https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.BitmapReader! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.BitmapReader`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setEffects(androidx.media3.common.Effect...)(effects: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Effect!>!)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect`s used. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setEffects(java.util.List<androidx.media3.common.Effect>)(effects: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Effect!>!)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect`s used. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setOnEndedListener(androidx.media3.test.utils.VideoFrameProcessorTestRunner.OnVideoFrameProcessingEndedListener)( onEndedListener: https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.OnVideoFrameProcessingEndedListener! )` Sets the method to be called in `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.Listener#onEnded()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setOnOutputFrameAvailableForRenderingListener(androidx.media3.test.utils.VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener)( onOutputFrameAvailableListener: https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener! )` Sets the method to be called in `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.Listener#onOutputFrameAvailableForRendering(long,boolean)`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setOutputColorInfo(androidx.media3.common.ColorInfo)(outputColorInfo: https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo!)` Sets the output `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setOutputFileLabel(java.lang.String)(outputFileLabel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Sets the output file label. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setPixelWidthHeightRatio(float)(pixelWidthHeightRatio: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the `pixelWidthHeightRatio`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setTestId(java.lang.String)(testId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Sets the test ID, used to generate output files. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setVideoAssetPath(java.lang.String)(videoAssetPath: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Sets the input video asset path. |
| `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#setVideoFrameProcessorFactory(androidx.media3.common.VideoFrameProcessor.Factory)( videoFrameProcessorFactory: https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.Factory! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.Factory`. |

## Public constructors

### Builder

```
Builder()
```

Creates a new instance with default values.

## Public functions

### build

```
fun build(): VideoFrameProcessorTestRunner!
```

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessingException` |   |

### setBitmapReader

```
@CanIgnoreReturnValue
fun setBitmapReader(
    bitmapReader: VideoFrameProcessorTestRunner.BitmapReader!
): VideoFrameProcessorTestRunner.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.BitmapReader`.

The default value is a `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.SurfaceBitmapReader` instance.

### setEffects

```
@CanIgnoreReturnValue
fun setEffects(effects: Array<Effect!>!): VideoFrameProcessorTestRunner.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect`s used.

The default value is an empty list.

### setEffects

```
@CanIgnoreReturnValue
fun setEffects(effects: (Mutable)List<Effect!>!): VideoFrameProcessorTestRunner.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/Effect`s used.

The default value is an empty list.

### setOnEndedListener

```
@CanIgnoreReturnValue
fun setOnEndedListener(
    onEndedListener: VideoFrameProcessorTestRunner.OnVideoFrameProcessingEndedListener!
): VideoFrameProcessorTestRunner.Builder!
```

Sets the method to be called in `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.Listener#onEnded()`.

The default value is a no-op.

### setOnOutputFrameAvailableForRenderingListener

```
@CanIgnoreReturnValue
fun setOnOutputFrameAvailableForRenderingListener(
    onOutputFrameAvailableListener: VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener!
): VideoFrameProcessorTestRunner.Builder!
```

Sets the method to be called in `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.Listener#onOutputFrameAvailableForRendering(long,boolean)`.

The method will be called on the thread the `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner` is created on.

The default value is a no-op.

### setOutputColorInfo

```
@CanIgnoreReturnValue
fun setOutputColorInfo(outputColorInfo: ColorInfo!): VideoFrameProcessorTestRunner.Builder!
```

Sets the output `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo`.

The default value is `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo#SDR_BT709_LIMITED()`.

### setOutputFileLabel

```
@CanIgnoreReturnValue
fun setOutputFileLabel(outputFileLabel: String!): VideoFrameProcessorTestRunner.Builder!
```

Sets the output file label.

This value will be postfixed after the `testId` to generated output files.

The default value is an empty string.

### setPixelWidthHeightRatio

```
@CanIgnoreReturnValue
fun setPixelWidthHeightRatio(pixelWidthHeightRatio: Float): VideoFrameProcessorTestRunner.Builder!
```

Sets the `pixelWidthHeightRatio`.

The default value is `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.Builder#DEFAULT_PIXEL_WIDTH_HEIGHT_RATIO()`.

### setTestId

```
@CanIgnoreReturnValue
fun setTestId(testId: String!): VideoFrameProcessorTestRunner.Builder!
```

Sets the test ID, used to generate output files.

This is a required value.

### setVideoAssetPath

```
@CanIgnoreReturnValue
fun setVideoAssetPath(videoAssetPath: String!): VideoFrameProcessorTestRunner.Builder!
```

Sets the input video asset path.

No default value is set. Must be set when the input is a video file.

### setVideoFrameProcessorFactory

```
@CanIgnoreReturnValue
fun setVideoFrameProcessorFactory(
    videoFrameProcessorFactory: VideoFrameProcessor.Factory!
): VideoFrameProcessorTestRunner.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.Factory`.

This is a required value.