Class (GI Struct)

GstGL-1.0GstGLGLMemory

GstGLMemory is a GstGL.GLBaseMemory subclass providing support for the mapping of OpenGL textures.

GstGL.GLMemory is created or wrapped through gst_gl_base_memory_alloc() with GstGL.GLVideoAllocationParams.

Data is uploaded or downloaded from the GPU as is necessary.

The Gst.Caps that is used for GstGL.GLMemory based buffers should contain the GST_CAPS_FEATURE_MEMORY_GL_MEMORY as a Gst.CapsFeatures and should contain a 'texture-target' field with one of the GstGL.GLTextureTarget values as a string, i.e. some combination of 'texture-target=(string){2D, rectangle, external-oes}'.

Index

Constructors

Properties

plane: number
tex_format: GstGL.GLFormat
tex_id: number
tex_scaling: number[]
tex_width: number
texture_wrapped: boolean
unpack_length: number
$gtype: GType<GLMemory>

Methods

  • Reads the texture in GstGL.GLMemory into write_pointer if no buffer is bound to GL_PIXEL_PACK_BUFFER. Otherwise write_pointer is the byte offset into the currently bound GL_PIXEL_PACK_BUFFER buffer to store the result of glReadPixels. See the OpenGL specification for glReadPixels for more details.

    Parameters

    • Optionalwrite_pointer: any

      the data pointer to pass to glReadPixels

    Returns boolean

    whether theread operation succeeded

  • Reads the texture in read_pointer into gl_mem.

    See gst_gl_memory_read_pixels() for what read_pointer signifies.

    Parameters

    • Optionalread_pointer: any

      the data pointer to pass to glTexSubImage

    Returns void

  • Initializes the GL Base Texture allocator. It is safe to call this function multiple times. This must be called before any other GstGLMemory operation.

    Returns void