Top |
Object Hierarchy
GBoxed ╰── GstGLBufferAllocationParams GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstAllocator ╰── GstGLBaseMemoryAllocator ╰── GstGLBufferAllocator
Description
GstGLBuffer is a GstMemory subclass providing support for the mapping of GL buffers.
Data is uploaded or downloaded from the GPU as is necessary.
Functions
gst_gl_buffer_init_once ()
void
gst_gl_buffer_init_once (void
);
Initializes the GL Buffer allocator. It is safe to call this function multiple times. This must be called before any other GstGLBuffer operation.
Since: 1.8
gst_gl_buffer_allocation_params_new ()
GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext *context
,gsize alloc_size
,GstAllocationParams *alloc_params
,guint gl_target
,guint gl_usage
);
Parameters
context |
||
alloc_size |
the size in bytes to allocate |
|
alloc_params |
the GstAllocationParams for |
[allow-none] |
gl_target |
the OpenGL target to allocate |
|
gl_usage |
the OpenGL usage hint to allocate with |
Since: 1.8
Types and Values
GstGLBuffer
typedef struct { GstGLBaseMemory mem; guint id; guint target; /* XXX: put this in the allocator? */ guint usage_hints; /* XXX: put this in the allocator? */ } GstGLBuffer;
Represents information about a GL buffer
Members
GstGLBaseMemory |
the parent object |
|
guint |
the buffer id for this memory |
|
guint |
the OpenGL target of this texture for binding purposes |
|
guint |
the OpenGL usage hints this buffer was created with |
struct GstGLBufferAllocationParams
struct GstGLBufferAllocationParams { GstGLAllocationParams parent; guint gl_target; guint gl_usage; };
Members
GstGLAllocationParams |
parent object |
|
guint |
the OpenGL target to bind the buffer to |
|
guint |
the OpenGL usage hint to create the buffer with |
GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER
#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER (1 << 4)
GL allocation flag indicating the allocation of a GL buffer.
GstGLBufferAllocator
typedef struct _GstGLBufferAllocator GstGLBufferAllocator;
Opaque GstGLAllocator struct
GstGLBufferAllocatorClass
typedef struct { GstGLBaseMemoryAllocatorClass parent_class; } GstGLBufferAllocatorClass;
The GstGLBufferAllocatorClass only contains private data
GST_GL_BUFFER_ALLOCATOR_NAME
#define GST_GL_BUFFER_ALLOCATOR_NAME "GLBuffer"
The name of the GL buffer allocator