mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
glbuffer: remove buffer specific transfer flags
Instead rely on GstGLBaseMemory's transfer handling
This commit is contained in:
parent
f83b834628
commit
ab75223594
2 changed files with 2 additions and 20 deletions
|
@ -131,7 +131,7 @@ gst_gl_buffer_cpu_access (GstGLBuffer * mem, GstMapInfo * info, gsize size)
|
||||||
|
|
||||||
/* The extra data pointer indirection/memcpy is needed for coherent across
|
/* The extra data pointer indirection/memcpy is needed for coherent across
|
||||||
* concurrent map()'s in both GL and CPU */
|
* concurrent map()'s in both GL and CPU */
|
||||||
if (GST_MEMORY_FLAG_IS_SET (mem, GST_GL_BUFFER_FLAG_NEED_DOWNLOAD)
|
if (GST_MEMORY_FLAG_IS_SET (mem, GST_GL_BASE_MEMORY_TRANSFER_NEED_DOWNLOAD)
|
||||||
&& (info->flags & GST_MAP_GL) == 0 && (info->flags & GST_MAP_READ) != 0) {
|
&& (info->flags & GST_MAP_GL) == 0 && (info->flags & GST_MAP_READ) != 0) {
|
||||||
gl->BindBuffer (mem->target, mem->id);
|
gl->BindBuffer (mem->target, mem->id);
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ gst_gl_buffer_upload_cpu_write (GstGLBuffer * mem, GstMapInfo * info,
|
||||||
* concurrent map()'s in both GL and CPU */
|
* concurrent map()'s in both GL and CPU */
|
||||||
/* FIXME: uploading potentially half-written data for libav pushing READWRITE
|
/* FIXME: uploading potentially half-written data for libav pushing READWRITE
|
||||||
* mapped buffers */
|
* mapped buffers */
|
||||||
if (GST_MEMORY_FLAG_IS_SET (mem, GST_GL_BUFFER_FLAG_NEED_UPLOAD)
|
if (GST_MEMORY_FLAG_IS_SET (mem, GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD)
|
||||||
|| (mem->mem.map_flags & GST_MAP_WRITE) != 0) {
|
|| (mem->mem.map_flags & GST_MAP_WRITE) != 0) {
|
||||||
gl->BindBuffer (mem->target, mem->id);
|
gl->BindBuffer (mem->target, mem->id);
|
||||||
|
|
||||||
|
|
|
@ -39,24 +39,6 @@ GType gst_gl_buffer_allocator_get_type(void);
|
||||||
#define GST_GL_BUFFER_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_BUFFER_ALLOCATOR, GstGLBufferAllocatorClass))
|
#define GST_GL_BUFFER_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_BUFFER_ALLOCATOR, GstGLBufferAllocatorClass))
|
||||||
#define GST_GL_BUFFER_ALLOCATOR_CAST(obj) ((GstGLBufferAllocator *)(obj))
|
#define GST_GL_BUFFER_ALLOCATOR_CAST(obj) ((GstGLBufferAllocator *)(obj))
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_GL_BUFFER_FLAG_NEED_DOWNLOAD = (GST_MEMORY_FLAG_LAST << 0),
|
|
||||||
GST_GL_BUFFER_FLAG_NEED_UPLOAD = (GST_MEMORY_FLAG_LAST << 1)
|
|
||||||
} GstGLBufferFlags;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GST_MAP_GL:
|
|
||||||
*
|
|
||||||
* Flag indicating that we should map the GL object instead of to system memory.
|
|
||||||
*
|
|
||||||
* Combining #GST_MAP_GL with #GST_MAP_WRITE has the same semantics as though
|
|
||||||
* you are writing to OpenGL. Conversely, combining #GST_MAP_GL with
|
|
||||||
* #GST_MAP_READ has the same semantics as though you are reading from OpenGL.
|
|
||||||
*/
|
|
||||||
#define GST_MAP_GL (GST_MAP_FLAG_LAST << 1)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstGLBuffer:
|
* GstGLBuffer:
|
||||||
* @mem: the parent object
|
* @mem: the parent object
|
||||||
|
|
Loading…
Reference in a new issue