ProcessAndRenderToSurfaceConsumer


@RequiresApi(value = 34)
@ExperimentalApi
public final class ProcessAndRenderToSurfaceConsumer implements PacketConsumer


A PacketConsumer that renders a Packet of HardwareBufferFrames to a android.view.SurfaceHolder.

Summary

Public methods

void

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

void

Releases all resources.

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.