DefaultHardwareBufferEffectsPipeline


@RequiresApi(value = 34)
@ExperimentalApi
public final class DefaultHardwareBufferEffectsPipeline implements RenderingPacketConsumer


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

Summary

Public constructors

Public methods

void

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

void

Releases all resources.

void

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

void

Sets the target for where input frames are rendered to.

Public constructors

DefaultHardwareBufferEffectsPipeline

public DefaultHardwareBufferEffectsPipeline()

Public methods

queuePacket

public void queuePacket(
    @NonNull PacketConsumer.Packet<@NonNull ImmutableList<@NonNull HardwareBufferFrame>> packet
)

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.

release

public void release()

Releases all resources.

setErrorConsumer

public void setErrorConsumer(@NonNull Consumer<@NonNull Exception> errorConsumer)

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

setRenderOutput

public void setRenderOutput(HardwareBufferFrameQueue output)

Sets the target for where input frames are rendered to.