GstGLBaseMemory

GstGLBaseMemory

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstAllocator
                ╰── GstGLBaseMemoryAllocator
                    ├── GstGLBufferAllocator
                    ╰── GstGLMemoryAllocator

Description

Functions

GstGLAllocationParamsCopyFunc ()

void
(*GstGLAllocationParamsCopyFunc) (GstGLAllocationParams *src,
                                  GstGLAllocationParams *dest);

GstGLAllocationParamsFreeFunc ()

void
(*GstGLAllocationParamsFreeFunc) (gpointer params);

gst_gl_allocation_params_init ()

gboolean
gst_gl_allocation_params_init (GstGLAllocationParams *params,
                               gsize struct_size,
                               guint alloc_flags,
                               GstGLAllocationParamsCopyFunc copy,
                               GstGLAllocationParamsFreeFunc free,
                               GstGLContext *context,
                               gsize alloc_size,
                               GstAllocationParams *alloc_params,
                               gpointer wrapped_data,
                               gpointer gl_handle,
                               gpointer user_data,
                               GDestroyNotify notify);

gst_gl_allocation_params_copy ()

GstGLAllocationParams *
gst_gl_allocation_params_copy (GstGLAllocationParams *src);

gst_gl_allocation_params_free ()

void
gst_gl_allocation_params_free (GstGLAllocationParams *params);

gst_gl_allocation_params_free_data ()

void
gst_gl_allocation_params_free_data (GstGLAllocationParams *params);

gst_gl_allocation_params_copy_data ()

void
gst_gl_allocation_params_copy_data (GstGLAllocationParams *src,
                                    GstGLAllocationParams *dest);

gst_gl_base_memory_init_once ()

void
gst_gl_base_memory_init_once (void);

gst_gl_base_memory_init ()

void
gst_gl_base_memory_init (GstGLBaseMemory *mem,
                         GstAllocator *allocator,
                         GstMemory *parent,
                         GstGLContext *context,
                         GstAllocationParams *params,
                         gsize size,
                         gpointer user_data,
                         GDestroyNotify notify);

gst_is_gl_base_memory ()

gboolean
gst_is_gl_base_memory (GstMemory *mem);

GstGLBaseMemoryAllocatorAllocFunction ()

GstGLBaseMemory *
(*GstGLBaseMemoryAllocatorAllocFunction)
                               (GstGLBaseMemoryAllocator *allocator,
                                GstGLAllocationParams *params);

GstGLBaseMemoryAllocatorCreateFunction ()

gboolean
(*GstGLBaseMemoryAllocatorCreateFunction)
                               (GstGLBaseMemory *mem,
                                GError **error);

GstGLBaseMemoryAllocatorMapFunction ()

gpointer
(*GstGLBaseMemoryAllocatorMapFunction)
                               (GstGLBaseMemory *mem,
                                GstMapInfo *info,
                                gsize maxsize);

GstGLBaseMemoryAllocatorUnmapFunction ()

void
(*GstGLBaseMemoryAllocatorUnmapFunction)
                               (GstGLBaseMemory *mem,
                                GstMapInfo *info);

GstGLBaseMemoryAllocatorCopyFunction ()

GstGLBaseMemory *
(*GstGLBaseMemoryAllocatorCopyFunction)
                               (GstGLBaseMemory *mem,
                                gssize offset,
                                gssize size);

GstGLBaseMemoryAllocatorDestroyFunction ()

void
(*GstGLBaseMemoryAllocatorDestroyFunction)
                               (GstGLBaseMemory *mem);

gst_gl_base_memory_alloc ()

GstGLBaseMemory *
gst_gl_base_memory_alloc (GstGLBaseMemoryAllocator *allocator,
                          GstGLAllocationParams *params);

gst_gl_base_memory_alloc_data ()

gboolean
gst_gl_base_memory_alloc_data (GstGLBaseMemory *gl_mem);

gst_gl_base_memory_memcpy ()

gboolean
gst_gl_base_memory_memcpy (GstGLBaseMemory *src,
                           GstGLBaseMemory *dest,
                           gssize offset,
                           gssize size);

Types and Values

GstGLBaseMemoryAllocator

typedef struct _GstGLBaseMemoryAllocator GstGLBaseMemoryAllocator;

GstGLBaseMemoryAllocatorClass

typedef struct {
  GstAllocatorClass parent_class;

  GstGLBaseMemoryAllocatorAllocFunction         alloc;

  GstGLBaseMemoryAllocatorCreateFunction        create;
  GstGLBaseMemoryAllocatorMapFunction           map;
#if 0
  GstGLBaseMemoryAllocatorFlushFunction         flush;        /* make CPU writes visible to the GPU */
  GstGLBaseMemoryAllocatorInvalidateFunction    invalidate;   /* make GPU writes visible to the CPU */
#endif
  GstGLBaseMemoryAllocatorUnmapFunction         unmap;
  GstGLBaseMemoryAllocatorCopyFunction          copy;
  GstGLBaseMemoryAllocatorDestroyFunction       destroy;
} GstGLBaseMemoryAllocatorClass;

GST_GL_BASE_MEMORY_ALLOCATOR_NAME

#define GST_GL_BASE_MEMORY_ALLOCATOR_NAME   "GLBaseMemory"

GST_MAP_GL

#define GST_MAP_GL (GST_MAP_FLAG_LAST << 1)

enum GstGLBaseMemoryError

Members

GST_GL_BASE_MEMORY_ERROR_FAILED

   

GST_GL_BASE_MEMORY_ERROR_OLD_LIBS

   

GST_GL_BASE_MEMORY_ERROR_RESOURCE_UNAVAILABLE

   

GST_GL_BASE_MEMORY_ERROR

#define GST_GL_BASE_MEMORY_ERROR (gst_gl_base_memory_error_quark ())

enum GstGLBaseMemoryTransfer

Members

GST_GL_BASE_MEMORY_TRANSFER_NEED_DOWNLOAD

   

GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD

   

struct GstGLAllocationParams

struct GstGLAllocationParams {
  gsize                             struct_size;
  GstGLAllocationParamsCopyFunc     copy;
  GstGLAllocationParamsFreeFunc     free;

  guint                             alloc_flags;
  gsize                             alloc_size;
  GstAllocationParams              *alloc_params;
  GstGLContext                     *context;
  GDestroyNotify                    notify;
  gpointer                          user_data;

  /* GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM only */
  gpointer                          wrapped_data;
  /* GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE only */
  gpointer                          gl_handle;
};

GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC

#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC (1 << 0)

GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM

#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM (1 << 1)

GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE

#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE (1 << 2)

GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER

#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER (1 << 16)

GstGLBaseMemory

typedef struct {
  GstMemory             mem;

  GstGLContext         *context;
} GstGLBaseMemory;