VideoFrameTextureBuffer

class VideoFrameTextureBuffer(val width: Int, val height: Int, val textureId: Int, val transformMatrix: Matrix?, val type: VideoFrameTextureBuffer.Type, releaseCallback: Runnable) : VideoFrameBuffer

VideoFrameTextureBuffer provides an reference counted wrapper of an OpenGLES texture and related metadata

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, textureId: Int, transformMatrix: Matrix?, type: VideoFrameTextureBuffer.Type, releaseCallback: Runnable)

Types

Link copied to clipboard

Wrapper enum of underlying supported GL texture types

Properties

Link copied to clipboard
open override val height: Int

Height of the video frame buffer

Link copied to clipboard

ID of underlying GL texture

Link copied to clipboard

The transform matrix associated with the frame. This transform matrix maps 2D homogeneous coordinates of the form (s, t, 1) with s and t in the inclusive range [0, 1] to the coordinate that should be used to sample that location from the buffer.

Link copied to clipboard

GL type of underlying GL texture

Link copied to clipboard
open override val width: Int

Width of the video frame buffer

Functions

Link copied to clipboard
open override fun release()

Release the video frame buffer. Use after frame construction or release after the frame is no longer needed. Will trigger appropriate release of any internally allocated resources. Not using may result in leaks.

Link copied to clipboard
open override fun retain()

Retain the video frame buffer. Use when shared ownership of the buffer is desired (e.g. when passing to separate thread), otherwise the frame may be spuriously released