DefaultGlFrameProcessor.Factory


public final class DefaultGlFrameProcessor.Factory implements FrameProcessor.Factory


A FrameProcessor.Factory that creates DefaultGlFrameProcessor instances.

Summary

Public constructors

Factory(
    Context context,
    GlObjectsProvider glObjectsProvider,
    HardwareBufferJniWrapper hardwareBufferJniWrapper,
    ListeningExecutorService glExecutorService
)

Creates an instance.

Public methods

DefaultGlFrameProcessor
create(
    FrameWriter output,
    Executor listenerExecutor,
    FrameProcessor.Listener listener
)

Creates a FrameProcessor that sends frames to the given FrameWriter.

Public constructors

Factory

public Factory(
    Context context,
    GlObjectsProvider glObjectsProvider,
    HardwareBufferJniWrapper hardwareBufferJniWrapper,
    ListeningExecutorService glExecutorService
)

Creates an instance.

The caller is responsible for setting up OpenGL resources and releasing them after closing the built DefaultGlFrameProcessor. The caller should also shut down the glExecutorService.

Public methods

create

public DefaultGlFrameProcessor create(
    FrameWriter output,
    Executor listenerExecutor,
    FrameProcessor.Listener listener
)

Creates a FrameProcessor that sends frames to the given FrameWriter.

Parameters
FrameWriter output

The FrameWriter to which the FrameProcessor outputs.

Executor listenerExecutor

The Executor on which the listener is invoked.

FrameProcessor.Listener listener

A Listener to be invoked for FrameProcessor events.