# RenderingPacketConsumer

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/RenderingPacketConsumer.kt+class:androidx.media3.effect.RenderingPacketConsumer)

*** ** * ** ***


```
@ExperimentalApi
interface RenderingPacketConsumer<I : Any?, O : Any?> : PacketConsumer<I>
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/media3/effect/PacketConsumer` that renders input `https://developer.android.com/reference/kotlin/androidx/media3/effect/PacketConsumer.Packet`s to an output `https://developer.android.com/reference/kotlin/androidx/media3/effect/RenderingPacketConsumer`.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/RenderingPacketConsumer#setErrorConsumer(java.util.function.Consumer)(errorConsumer: https://developer.android.com/reference/java/util/function/Consumer.html<https://developer.android.com/reference/java/lang/Exception.html>)` Sets a `https://developer.android.com/reference/java/util/function/Consumer.html` to handle any `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-exception/index.html`s that occur during rendering. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/RenderingPacketConsumer#setRenderOutput(kotlin.Any)(output: O?)` Sets the target for where input frames are rendered to. |

### Inherited functions

From [androidx.media3.effect.PacketConsumer](https://developer.android.com/reference/kotlin/androidx/media3/effect/PacketConsumer) `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/effect/PacketConsumer#queuePacket(androidx.media3.effect.PacketConsumer.Packet)(packet: https://developer.android.com/reference/kotlin/androidx/media3/effect/PacketConsumer.Packet<I>)`

Queues a `https://developer.android.com/reference/kotlin/androidx/media3/effect/PacketConsumer.Packet` for processing, suspending the caller if the consumer is at capacity.
`suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/effect/PacketConsumer#release()()`

Releases all resources.

## Public functions

### setErrorConsumer

```
fun setErrorConsumer(errorConsumer: Consumer<Exception>): Unit
```

Sets a `https://developer.android.com/reference/java/util/function/Consumer.html` to handle any `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-exception/index.html`s that occur during rendering.

### setRenderOutput

```
fun setRenderOutput(output: O?): Unit
```

Sets the target for where input frames are rendered to.