GlTextureFrame.Builder


public final class GlTextureFrame.Builder


A builder for GlTextureFrame instances.

Summary

Public constructors

Builder(
    GlTextureInfo glTextureInfo,
    Executor releaseTextureExecutor,
    Consumer<GlTextureInfo> releaseTextureCallback
)

Creates a new Builder.

Public constructors

Builder

public Builder(
    GlTextureInfo glTextureInfo,
    Executor releaseTextureExecutor,
    Consumer<GlTextureInfo> releaseTextureCallback
)

Creates a new Builder.

Parameters
GlTextureInfo glTextureInfo

The GlTextureInfo to wrap.

Executor releaseTextureExecutor

The Executor on which the releaseTextureCallback is called.

Consumer<GlTextureInfo> releaseTextureCallback

The Consumer to call to release the texture.

Public methods

build

public GlTextureFrame build()

Builds the GlTextureFrame instance.

setFormat

@CanIgnoreReturnValue
public GlTextureFrame.Builder setFormat(Format format)

Sets the format.

setPresentationTimeUs

@CanIgnoreReturnValue
public GlTextureFrame.Builder setPresentationTimeUs(long presentationTimeUs)

Sets the presentationTimeUs.

setReleaseTimeNs

@CanIgnoreReturnValue
public GlTextureFrame.Builder setReleaseTimeNs(long releaseTimeNs)

Sets the releaseTimeNs.