PacketConsumer
@ExperimentalApi
interface PacketConsumer<T : Any?>
PacketProcessor |
A |
RecordingPacketConsumer |
A |
RenderingPacketConsumer |
A |
DefaultHardwareBufferEffectsPipeline |
A |
RecordingHardwareBufferEffectsPipeline |
Wraps a |
A consumer that accepts Packets.
This interface is experimental and will be renamed or removed in a future release.
| Parameters | |
|---|---|
<T : Any?> |
The type of Packet.payload being consumed. |
Summary
Nested types |
|---|
fun interface PacketConsumer.Factory<T : Any?>A factory for |
sealed interface PacketConsumer.Packet<T : Any?>Represents a packet. |
data object PacketConsumer.Packet.EndOfStream : PacketConsumer.PacketA |
data class PacketConsumer.Packet.Payload<T : Any?> : PacketConsumer.Packet |
Public functions |
|
|---|---|
suspend Unit |
queuePacket(packet: PacketConsumer.Packet<T>)Queues a |
suspend Unit |
release()Releases all resources. |
Public functions
queuePacket
suspend fun queuePacket(packet: PacketConsumer.Packet<T>): Unit
Queues a Packet for processing, suspending the caller if the consumer is at capacity.
Once this method returns, the ownership of the packet is transferred to this PacketConsumer, and the caller should not modify the packet.
| Parameters | |
|---|---|
packet: PacketConsumer.Packet<T> |
The |