GlTextureFrame.Builder
public final class GlTextureFrame.Builder
A builder for GlTextureFrame instances.
Summary
Public constructors |
|---|
Builder(Creates a new |
Public methods |
|
|---|---|
GlTextureFrame |
build()Builds the |
GlTextureFrame.Builder |
@CanIgnoreReturnValueSets the |
GlTextureFrame.Builder |
@CanIgnoreReturnValueSets the |
GlTextureFrame.Builder |
@CanIgnoreReturnValueSets the |
GlTextureFrame.Builder |
@CanIgnoreReturnValueSets the |
GlTextureFrame.Builder |
@CanIgnoreReturnValueSets the |
Public constructors
Builder
public Builder(
GlTextureInfo glTextureInfo,
Executor releaseTextureExecutor,
Consumer<GlTextureInfo> releaseTextureCallback
)
Creates a new Builder.
| Parameters | |
|---|---|
GlTextureInfo glTextureInfo |
The |
Executor releaseTextureExecutor |
The |
Consumer<GlTextureInfo> releaseTextureCallback |
The |
Public methods
setFenceSync
@CanIgnoreReturnValue
public GlTextureFrame.Builder setFenceSync(long fenceSync)
Sets the fenceSync.
The default value is GL_FENCE_SYNC_UNSET.
The consumer of the frame is expected to wait on this fence (e.g. using glWaitSync or glClientWaitSync) to ensure the texture content is fully written before reading it.
| Parameters | |
|---|---|
long fenceSync |
The OpenGL fence sync object. |
setFormat
@CanIgnoreReturnValue
public GlTextureFrame.Builder setFormat(Format format)
Sets the format.
setMetadata
@CanIgnoreReturnValue
public GlTextureFrame.Builder setMetadata(Map<String, Object> metadata)
Sets the metadata.
setPresentationTimeUs
@CanIgnoreReturnValue
public GlTextureFrame.Builder setPresentationTimeUs(long presentationTimeUs)
Sets the presentationTimeUs.
setReleaseTimeNs
@CanIgnoreReturnValue
public GlTextureFrame.Builder setReleaseTimeNs(long releaseTimeNs)
Sets the releaseTimeNs.