GstGLMemory

GstGLMemory

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstAllocator
                ╰── GstGLBaseMemoryAllocator
                    ╰── GstGLMemoryAllocator
                        ╰── GstGLMemoryPBOAllocator

Description

Functions

gst_gl_video_allocation_params_copy_data ()

void
gst_gl_video_allocation_params_copy_data
                               (GstGLVideoAllocationParams *src_vid,
                                GstGLVideoAllocationParams *dest_vid);

gst_gl_video_allocation_params_free_data ()

void
gst_gl_video_allocation_params_free_data
                               (GstGLVideoAllocationParams *params);

gst_gl_video_allocation_params_init_full ()

gboolean
gst_gl_video_allocation_params_init_full
                               (GstGLVideoAllocationParams *params,
                                gsize struct_size,
                                guint alloc_flags,
                                GstGLAllocationParamsCopyFunc copy,
                                GstGLAllocationParamsFreeFunc free,
                                GstGLContext *context,
                                GstAllocationParams *alloc_params,
                                GstVideoInfo *v_info,
                                guint plane,
                                GstVideoAlignment *valign,
                                GstGLTextureTarget target,
                                GstVideoGLTextureType tex_type,
                                gpointer wrapped_data,
                                gpointer gl_handle,
                                gpointer user_data,
                                GDestroyNotify notify);

gst_gl_video_allocation_params_new ()

GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new (GstGLContext *context,
                                    GstAllocationParams *alloc_params,
                                    GstVideoInfo *v_info,
                                    guint plane,
                                    GstVideoAlignment *valign,
                                    GstGLTextureTarget target,
                                    GstVideoGLTextureType tex_type);

gst_gl_video_allocation_params_new_wrapped_data ()

GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new_wrapped_data
                               (GstGLContext *context,
                                GstAllocationParams *alloc_params,
                                GstVideoInfo *v_info,
                                guint plane,
                                GstVideoAlignment *valign,
                                GstGLTextureTarget target,
                                GstVideoGLTextureType tex_type,
                                gpointer wrapped_data,
                                gpointer user_data,
                                GDestroyNotify notify);

gst_gl_video_allocation_params_new_wrapped_gl_handle ()

GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new_wrapped_gl_handle
                               (GstGLContext *context,
                                GstAllocationParams *alloc_params,
                                GstVideoInfo *v_info,
                                guint plane,
                                GstVideoAlignment *valign,
                                GstGLTextureTarget target,
                                GstVideoGLTextureType tex_type,
                                gpointer gl_handle,
                                gpointer user_data,
                                GDestroyNotify notify);

gst_gl_video_allocation_params_new_wrapped_texture ()

GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new_wrapped_texture
                               (GstGLContext *context,
                                GstAllocationParams *alloc_params,
                                GstVideoInfo *v_info,
                                guint plane,
                                GstVideoAlignment *valign,
                                GstGLTextureTarget target,
                                GstVideoGLTextureType tex_type,
                                guint tex_id,
                                gpointer user_data,
                                GDestroyNotify notify);

gst_gl_memory_allocator_get_default ()

GstGLMemoryAllocator *
gst_gl_memory_allocator_get_default (GstGLContext *context);

gst_gl_memory_init_once ()

void
gst_gl_memory_init_once (void);

gst_gl_memory_init ()

void
gst_gl_memory_init (GstGLMemory *mem,
                    GstAllocator *allocator,
                    GstMemory *parent,
                    GstGLContext *context,
                    GstGLTextureTarget target,
                    GstVideoGLTextureType tex_type,
                    GstAllocationParams *params,
                    GstVideoInfo *info,
                    guint plane,
                    GstVideoAlignment *valign,
                    gpointer user_data,
                    GDestroyNotify notify);

gst_is_gl_memory ()

gboolean
gst_is_gl_memory (GstMemory *mem);

gst_gl_memory_copy_into ()

gboolean
gst_gl_memory_copy_into (GstGLMemory *gl_mem,
                         guint tex_id,
                         GstGLTextureTarget target,
                         GstVideoGLTextureType tex_type,
                         gint width,
                         gint height);

gst_gl_memory_copy_teximage ()

gboolean
gst_gl_memory_copy_teximage (GstGLMemory *src,
                             guint tex_id,
                             GstGLTextureTarget out_target,
                             GstVideoGLTextureType out_tex_type,
                             gint width,
                             gint height);

gst_gl_memory_read_pixels ()

gboolean
gst_gl_memory_read_pixels (GstGLMemory *gl_mem,
                           gpointer read_pointer);

gst_gl_memory_texsubimage ()

void
gst_gl_memory_texsubimage (GstGLMemory *gl_mem,
                           gpointer read_pointer);

gst_gl_memory_get_texture_height ()

gint
gst_gl_memory_get_texture_height (GstGLMemory *gl_mem);

gst_gl_memory_get_texture_id ()

guint
gst_gl_memory_get_texture_id (GstGLMemory *gl_mem);

gst_gl_memory_get_texture_target ()

GstGLTextureTarget
gst_gl_memory_get_texture_target (GstGLMemory *gl_mem);

gst_gl_memory_get_texture_type ()

GstVideoGLTextureType
gst_gl_memory_get_texture_type (GstGLMemory *gl_mem);

gst_gl_memory_get_texture_width ()

gint
gst_gl_memory_get_texture_width (GstGLMemory *gl_mem);

gst_gl_memory_setup_buffer ()

gboolean
gst_gl_memory_setup_buffer (GstGLMemoryAllocator *allocator,
                            GstBuffer *buffer,
                            GstGLVideoAllocationParams *params,
                            GstVideoGLTextureType *tex_types,
                            gpointer *wrapped_data,
                            gsize n_wrapped_pointers);

Types and Values

GST_GL_MEMORY_VIDEO_FORMATS_STR

#define             GST_GL_MEMORY_VIDEO_FORMATS_STR

struct GstGLVideoAllocationParams

struct GstGLVideoAllocationParams {
  GstGLAllocationParams  parent;

  GstVideoInfo          *v_info;
  guint                  plane;
  GstVideoAlignment     *valign;
  GstGLTextureTarget     target;
  GstVideoGLTextureType  tex_type;
};

GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO

#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO (1 << 3)

GstGLMemoryAllocator

typedef struct _GstGLMemoryAllocator GstGLMemoryAllocator;

GstGLMemoryAllocatorClass

typedef struct {
  GstGLBaseMemoryAllocatorClass             parent_class;

  GstGLBaseMemoryAllocatorMapFunction       map;
  GstGLBaseMemoryAllocatorCopyFunction      copy;
  GstGLBaseMemoryAllocatorUnmapFunction     unmap;
} GstGLMemoryAllocatorClass;

GstGLMemory

typedef struct {
  GstGLBaseMemory           mem;

  guint                     tex_id;
  GstGLTextureTarget        tex_target;
  GstVideoGLTextureType     tex_type;
  GstVideoInfo              info;
  GstVideoAlignment         valign;
  guint                     plane;
  gfloat                    tex_scaling[2];
} GstGLMemory;

GST_GL_MEMORY_ALLOCATOR_NAME

#define GST_GL_MEMORY_ALLOCATOR_NAME   "GLMemory"