DefaultHardwareBufferEffectsPipeline


@RequiresApi(value = 34)
@ExperimentalApi
class DefaultHardwareBufferEffectsPipeline : RenderingPacketConsumer


A PacketProcessor that renders the input HardwareBufferFrame into a new output buffer using HardwareBufferRenderer.

Summary

Public constructors

Public functions

open suspend Unit

Queues a Packet for processing, suspending the caller if the consumer is at capacity.

open suspend Unit

Releases all resources.

open Unit

Sets a Consumer to handle any Exceptions that occur during rendering.

open Unit

Sets the target for where input frames are rendered to.

Public constructors

DefaultHardwareBufferEffectsPipeline

DefaultHardwareBufferEffectsPipeline()

Public functions

queuePacket

open suspend fun queuePacket(
    packet: PacketConsumer.Packet<ImmutableList<HardwareBufferFrame>>
): 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<ImmutableList<HardwareBufferFrame>>

The Packet to process.

release

open suspend fun release(): Unit

Releases all resources.

setErrorConsumer

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

Sets a Consumer to handle any Exceptions that occur during rendering.

setRenderOutput

open fun setRenderOutput(output: HardwareBufferFrameQueue?): Unit

Sets the target for where input frames are rendered to.