GlTextureFrame


@ExperimentalApi
class GlTextureFrame


A Frame implementation that wraps a GlTextureInfo.

Summary

Nested types

A builder for GlTextureFrame instances.

Public functions

GlTextureFrame.Builder!

Returns a Builder initialized with the values of this instance.

Unit

Releases the frame and its underlying resources.

Unit

Increases the reference count of this frame.

Public properties

Long

The OpenGL fence sync object (a createGlSyncFence handle) associated with this frame.

Format!

The format of the frame.

GlTextureInfo!

The GlTextureInfo.

Frame.Metadata!
Long

The presentation time of the frame, in microseconds.

Consumer<GlTextureInfo!>!

The Consumer to call to release the texture.

Executor!

The Executor on which the releaseTextureCallback is called.

Long

The release time of the frame, in nanoseconds.

Constants

END_OF_STREAM_FRAME

const val END_OF_STREAM_FRAMEGlTextureFrame!

Public functions

buildUpon

fun buildUpon(): GlTextureFrame.Builder!

Returns a Builder initialized with the values of this instance.

release

fun release(): Unit

Releases the frame and its underlying resources.

This implementation is idempotent if called after the frame has already been released. It will strictly release the underlying resources only when the count transitions from 1 to 0.

retain

fun retain(): Unit

Increases the reference count of this frame. For every call to this method there must be an extra release call before this frame is released.

Throws
java.lang.IllegalStateException

if called after the frame has been released.

Public properties

fenceSync

val fenceSyncLong

The OpenGL fence sync object (a createGlSyncFence handle) associated with this frame. See

If this texture is read in an OpenGL context different to the one it was written to, call awaitSyncObject on this fence before reading the glTextureInfo, to ensure the contents have been fully written to.

Callers must *not* delete this fence, as it may be reused up until this frame is released.

The value is GL_FENCE_SYNC_UNSET if no fence has been created for this texture, as it is only expected to be produced and consumed within the same GL command stream.

format

val formatFormat!

The format of the frame.

glTextureInfo

val glTextureInfoGlTextureInfo!

The GlTextureInfo.

metadata

val metadataFrame.Metadata!

presentationTimeUs

val presentationTimeUsLong

The presentation time of the frame, in microseconds.

releaseTextureCallback

val releaseTextureCallbackConsumer<GlTextureInfo!>!

The Consumer to call to release the texture.

releaseTextureExecutor

val releaseTextureExecutorExecutor!

The Executor on which the releaseTextureCallback is called.

releaseTimeNs

val releaseTimeNsLong

The release time of the frame, in nanoseconds.