# GlShaderProgram.InputListener

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

*** ** * ** ***


```
interface GlShaderProgram.InputListener
```

<br />

*** ** * ** ***

Listener for input-related video frame processing events.

This listener can be called from any thread.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram.InputListener#onFlush()()` Called when the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` has been flushed. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram.InputListener#onInputFrameProcessed(androidx.media3.common.GlTextureInfo)(inputTexture: https://developer.android.com/reference/kotlin/androidx/media3/common/GlTextureInfo!)` Called when the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` has processed an input frame. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram.InputListener#onReadyToAcceptInputFrame()()` Called when the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` is ready to accept another input frame. |

## Public functions

### onFlush

```
fun onFlush(): Unit
```

Called when the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` has been flushed.

The implementation shall not assume the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` is `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram.InputListener#onReadyToAcceptInputFrame()` when this method is called. If the implementation manages a limited input capacity, it must clear all prior `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram.InputListener#onReadyToAcceptInputFrame()`.

### onInputFrameProcessed

```
fun onInputFrameProcessed(inputTexture: GlTextureInfo!): Unit
```

Called when the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` has processed an input frame.

The implementation shall not assume the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` is `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram.InputListener#onReadyToAcceptInputFrame()` when this method is called.

| Parameters |
|---|---|
| `inputTexture: https://developer.android.com/reference/kotlin/androidx/media3/common/GlTextureInfo!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/GlTextureInfo` that was used to `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram#queueInputFrame(androidx.media3.common.GlObjectsProvider,androidx.media3.common.GlTextureInfo,long)` the input frame. |

### onReadyToAcceptInputFrame

```
fun onReadyToAcceptInputFrame(): Unit
```

Called when the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` is ready to accept another input frame.

For each time this method is called, `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram#queueInputFrame(androidx.media3.common.GlObjectsProvider,androidx.media3.common.GlTextureInfo,long)` can be called once.