# GlShaderProgram.OutputListener

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.OutputListener)

*** ** * ** ***


```
public interface GlShaderProgram.OutputListener
```

<br />

*** ** * ** ***

Listener for output-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.OutputListener#onCurrentOutputStreamEnded()()` Called when the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` will not produce further output frames belonging to the current output stream. |
| `default void` | `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram.OutputListener#onOutputFrameAvailable(androidx.media3.common.GlTextureInfo,long)( https://developer.android.com/reference/androidx/media3/common/GlTextureInfo outputTexture, long presentationTimeUs )` Called when the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` has produced an output frame. |

## Public methods

### onCurrentOutputStreamEnded

```
default void onCurrentOutputStreamEnded()
```

Called when the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` will not produce further output frames belonging to the current output stream. May be called multiple times for one output stream.

### onOutputFrameAvailable

```
default void onOutputFrameAvailable(
    GlTextureInfo outputTexture,
    long presentationTimeUs
)
```

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

After the listener's owner has processed the output frame, it must call `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram#releaseOutputFrame(androidx.media3.common.GlTextureInfo)`. The output frame should be released as soon as possible, as there is no guarantee that the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` will produce further output frames before this output frame is released.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/GlTextureInfo outputTexture` | A `https://developer.android.com/reference/androidx/media3/common/GlTextureInfo` describing the texture containing the output frame. |
| `long presentationTimeUs` | The presentation timestamp of the output frame, in microseconds. |