GlTextureFrameConsumer


@ExperimentalApi
interface GlTextureFrameConsumer : AutoCloseable


Consumes a GlTextureFrame.

This interface aims at resembling FrameProcessor.

Summary

Public functions

Unit
Boolean
queue(
    frame: GlTextureFrame!,
    listenerExecutor: Executor!,
    wakeupListener: Runnable!
)

Attempts to queue a frame for processing.

Unit

Notifies the current stream has ended.

Public functions

queue

fun queue(
    frame: GlTextureFrame!,
    listenerExecutor: Executor!,
    wakeupListener: Runnable!
): Boolean

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
frame: GlTextureFrame!

The input frame to process.

listenerExecutor: Executor!

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().

wakeupListener: Runnable!

The callback invoked when capacity is freed.

Returns
Boolean

true if queued successfully, false if at capacity.

signalEndOfStream

fun signalEndOfStream(): Unit

Notifies the current stream has ended.