gstgl.glmemory

Module for [GLMemory] class

class GLMemory

Types 1

GstGLMemory is a #GstGLBaseMemory subclass providing support for the mapping of OpenGL textures.

#GstGLMemory is created or wrapped through gstgl.glbase_memory.GLBaseMemory.alloc with #GstGLVideoAllocationParams.

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

The #GstCaps that is used for #GstGLMemory based buffers should contain the gstgl.types.CAPS_FEATURE_MEMORY_GL_MEMORY as a #GstCapsFeatures and should contain a 'texture-target' field with one of the #GstGLTextureTarget values as a string, i.e. some combination of 'texture-target=(string){2D, rectangle, external-oes}'.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
GLMemory self() nothrowReturns `this`, for use in `with` statements.
gstgl.glbase_memory.GLBaseMemory mem() @property nothrowGet `mem` field. Returns: the parent #GstGLBaseMemory object
uint texId() @property nothrowGet `texId` field. Returns: the GL texture id for this memory
void texId(uint propval) @property nothrowSet `texId` field. Params: propval = the GL texture id for this memory
gstgl.types.GLTextureTarget texTarget() @property nothrowGet `texTarget` field. Returns: the GL texture target for this memory
void texTarget(gstgl.types.GLTextureTarget propval) @property nothrowSet `texTarget` field. Params: propval = the GL texture target for this memory
gstgl.types.GLFormat texFormat() @property nothrowGet `texFormat` field. Returns: the texture type
void texFormat(gstgl.types.GLFormat propval) @property nothrowSet `texFormat` field. Params: propval = the texture type
gstvideo.video_info.VideoInfo info() @property nothrowGet `info` field. Returns: the texture's #GstVideoInfo
gstvideo.video_alignment.VideoAlignment valign() @property nothrowGet `valign` field. Returns: data alignment for system memory mapping
void valign(gstvideo.video_alignment.VideoAlignment propval) @property nothrowSet `valign` field. Params: propval = data alignment for system memory mapping
uint plane() @property nothrowGet `plane` field. Returns: data plane in @info
void plane(uint propval) @property nothrowSet `plane` field. Params: propval = data plane in @info
bool textureWrapped() @property nothrow
void textureWrapped(bool propval) @property nothrow
uint unpackLength() @property nothrow
void unpackLength(uint propval) @property nothrow
uint texWidth() @property nothrow
void texWidth(uint propval) @property nothrow
bool copyInto(uint texId, gstgl.types.GLTextureTarget target, gstgl.types.GLFormat texFormat, int width, int height) nothrowCopies gl_mem into the texture specified by tex_id. The format of tex_id is specified by tex_format, width and height.
bool copyTeximage(uint texId, gstgl.types.GLTextureTarget outTarget, gstgl.types.GLFormat outTexFormat, int outWidth, int outHeight) nothrowCopies the texture in #GstGLMemory into the texture specified by tex_id, out_target, out_tex_format, out_width and out_height.
int getTextureHeight() nothrow
uint getTextureId() nothrow
int getTextureWidth() nothrow
void init_(gst.allocator.Allocator allocator, gst.memory.Memory parent, gstgl.glcontext.GLContext context, gstgl.types.GLTextureTarget target, gstgl.types.GLFormat texFormat, gst.allocation_params.AllocationParams params, gstvideo.video_info.VideoInfo info, uint plane, gstvideo.video_alignment.VideoAlignment valign, void * userData = null, glib.types.DestroyNotify notify = null) nothrowInitializes mem with the required parameters. info is assumed to have already have been modified with [gstvideo.video_info.VideoInfo.align_].
bool readPixels(void * writePointer = null) nothrowReads the texture in #GstGLMemory 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` buf...
void texsubimage(void * readPointer = null) nothrowReads the texture in read_pointer into gl_mem.
void initOnce() static nothrowInitializes the GL Base Texture allocator. It is safe to call this function multiple times. This must be called before any other GstGLMemory operation.
Constructors
this(uint texId = uint.init, gstgl.types.GLTextureTarget texTarget = gstgl.types.GLTextureTarget.init, gstgl.types.GLFormat texFormat = gstgl.types.GLFormat.init, gstvideo.video_alignment.VideoAlignment valign = gstvideo.video_alignment.VideoAlignment.init, uint plane = uint.init, bool textureWrapped = bool.init, uint unpackLength = uint.init, uint texWidth = uint.init)Create a `glmemory.GLMemory` boxed type. Params: texId = the GL texture id for this memory texTarget = the GL texture target for this memory texFormat = the texture type valign = data alignment for...
this(void * ptr, Flag!"Take" take)