![]() |
![]() |
![]() |
GStreamer Bad Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
GstGLBuffer; void gst_gl_buffer_init_once (void
); gboolean gst_is_gl_buffer (GstMemory *mem
); GstGLBuffer * gst_gl_buffer_alloc (GstGLContext *context
,guint gl_target
,guint gl_usage
,GstAllocationParams *params
,gsize maxsize
); struct GstGLBufferAllocationParams; #define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext *context
,gsize alloc_size
,GstAllocationParams *alloc_params
,guint gl_target
,guint gl_usage
); GstGLBufferAllocator; GstGLBufferAllocatorClass; #define GST_GL_BUFFER_ALLOCATOR_NAME #define GST_CAPS_FEATURE_MEMORY_GL_BUFFER
GObject +----GInitiallyUnowned +----GstObject +----GstAllocator +----GstGLBaseMemoryAllocator +----GstGLBufferAllocator
GstGLBuffer is a GstMemory subclass providing support for the mapping of GL buffers.
Data is uploaded or downloaded from the GPU as is necessary.
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
GstGLBaseMemory |
the parent object |
the buffer id for this memory | |
the OpenGL target of this texture for binding purposes | |
the OpenGL usage hints this buffer was created with |
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
gboolean gst_is_gl_buffer (GstMemory *mem
);
|
a GstMemory |
Returns : |
whether the memory at mem is a GstGLBuffer
|
Since 1.8
GstGLBuffer * gst_gl_buffer_alloc (GstGLContext *context
,guint gl_target
,guint gl_usage
,GstAllocationParams *params
,gsize maxsize
);
struct GstGLBufferAllocationParams { GstGLAllocationParams parent; guint gl_target; guint gl_usage; };
GstGLAllocationParams |
parent object |
the OpenGL target to bind the buffer to | |
the OpenGL usage hint to create the buffer with |
#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER (1 << 4)
GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext *context
,gsize alloc_size
,GstAllocationParams *alloc_params
,guint gl_target
,guint gl_usage
);
|
a GstGLContext |
|
the size in bytes to allocate |
|
the GstAllocationParams for tex_id . [allow-none]
|
|
the OpenGL target to allocate |
|
the OpenGL usage hint to allocate with |
Returns : |
a new GstGLBufferAllocationParams for allocating OpenGL buffer objects |
Since 1.8
typedef struct _GstGLBufferAllocator GstGLBufferAllocator;
Opaque GstGLAllocator struct
typedef struct { GstGLBaseMemoryAllocatorClass parent_class; } GstGLBufferAllocatorClass;
The GstGLBufferAllocatorClass only contains private data
#define GST_GL_BUFFER_ALLOCATOR_NAME "GLBuffer"
The name of the GL buffer allocator