# GlTextureProducer.Listener

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/GlTextureProducer.java+class:androidx.media3.effect.GlTextureProducer.Listener)

*** ** * ** ***


```
public interface GlTextureProducer.Listener
```

<br />

*** ** * ** ***

Listener for texture output.

## Summary

| ### Public methods |
|---|---|
| `default void` | `https://developer.android.com/reference/androidx/media3/effect/GlTextureProducer.Listener#flush()()` Flushes the texture output listener. |
| `abstract void` | `https://developer.android.com/reference/androidx/media3/effect/GlTextureProducer.Listener#onTextureRendered(androidx.media3.effect.GlTextureProducer,androidx.media3.common.GlTextureInfo,long,long)( https://developer.android.com/reference/androidx/media3/effect/GlTextureProducer textureProducer, https://developer.android.com/reference/androidx/media3/common/GlTextureInfo outputTexture, long presentationTimeUs, long syncObject )` Called when a texture has been rendered to. |

## Public methods

### flush

```
default void flush()
```

Flushes the texture output listener.

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

### onTextureRendered

```
abstract void onTextureRendered(
    GlTextureProducer textureProducer,
    GlTextureInfo outputTexture,
    long presentationTimeUs,
    long syncObject
)
```

Called when a texture has been rendered to.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/effect/GlTextureProducer textureProducer` | The `https://developer.android.com/reference/androidx/media3/effect/GlTextureProducer` that has rendered the texture. |
| `https://developer.android.com/reference/androidx/media3/common/GlTextureInfo outputTexture` | The texture that has been rendered. |
| `long presentationTimeUs` | The presentation time of the texture. |
| `long syncObject` | A GL sync object that has been inserted into the GL command stream after the last write of the `outputTexture`. Value is 0 if and only if the `https://developer.android.com/reference/android/opengl/GLES30.html#glFenceSync(int, int)` failed. |

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