GlTextureFrameConsumer


@ExperimentalApi
public interface GlTextureFrameConsumer extends AutoCloseable


Consumes a GlTextureFrame.

This interface aims at resembling FrameProcessor.

Summary

Nested types

Allowing outputting GlTextureFrame from the GlTextureFrameConsumer.

Public methods

abstract void
abstract boolean
queue(
    GlTextureFrame frame,
    Executor listenerExecutor,
    Runnable wakeupListener
)

Attempts to queue a frame for processing.

abstract void

Notifies the current stream has ended.

Public methods

queue

abstract boolean queue(
    GlTextureFrame frame,
    Executor listenerExecutor,
    Runnable wakeupListener
)

Attempts to queue a frame for processing.

If the consumer is at capacity, it returns false and the wakeupListener will be invoked on the listenerExecutor when capacity becomes available.

Parameters
GlTextureFrame frame

The input frame to process.

Executor listenerExecutor

The Executor to run the wakeupListener. Must not execute synchronously (e.g., must not be a direct executor) to avoid re-entrant calls to queue().

Runnable wakeupListener

The callback invoked when capacity is freed.

Returns
boolean

true if queued successfully, false if at capacity.

signalEndOfStream

abstract void signalEndOfStream()

Notifies the current stream has ended.