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

*** ** * ** ***


```
public interface GlShaderProgram.InputListener
```

<br />

*** ** * ** ***

Listener for input-related video frame processing events.

This listener can be called from any thread.

## Summary

| ### Public methods |
|---|---|
| `default void` | `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram.InputListener#onFlush()()` Called when the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` has been flushed. |
| `default void` | `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram.InputListener#onInputFrameProcessed(androidx.media3.common.GlTextureInfo)(https://developer.android.com/reference/androidx/media3/common/GlTextureInfo inputTexture)` Called when the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` has processed an input frame. |
| `default void` | `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram.InputListener#onReadyToAcceptInputFrame()()` Called when the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` is ready to accept another input frame. |

## Public methods

### onFlush

```
default void onFlush()
```

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

The implementation shall not assume the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` is `https://developer.android.com/reference/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/androidx/media3/effect/GlShaderProgram.InputListener#onReadyToAcceptInputFrame()`.

### onInputFrameProcessed

```
default void onInputFrameProcessed(GlTextureInfo inputTexture)
```

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

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

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

### onReadyToAcceptInputFrame

```
default void onReadyToAcceptInputFrame()
```

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

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