GstAllocator: GStreamer 1.0 Core Reference Manual

## GstAllocator GstAllocator |

## Functions

GstAllocator * | gst_allocator_find ()
void | gst_allocator_register ()
void | gst_allocator_set_default ()
void | gst_allocation_params_init ()
GstAllocationParams * | gst_allocation_params_copy ()
void | gst_allocation_params_free ()
GstMemory * | gst_allocator_alloc ()
void | gst_allocator_free ()
GstMemory * | gst_memory_new_wrapped ()

## Types and Values

extern | gst_memory_alignment
| GstAllocator
struct | GstAllocatorClass
enum | GstAllocatorFlags
struct | GstAllocationParams
#define | GST_ALLOCATOR_SYSMEM

## Object Hierarchy

        GBoxed
        ╰── GstAllocationParams
        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstAllocator

## Includes

    #include <gst/gst.h>

## Description

## Functions

### gst_allocator_find ()

    GstAllocator *
    gst_allocator_find (const gchar *name);

### gst_allocator_register ()

    void
    gst_allocator_register (const gchar *name,
                            GstAllocator *allocator);

### gst_allocator_set_default ()

    void
    gst_allocator_set_default (GstAllocator *allocator);

### gst_allocation_params_init ()

    void
    gst_allocation_params_init (GstAllocationParams *params);

### gst_allocation_params_copy ()

    GstAllocationParams *
    gst_allocation_params_copy (const GstAllocationParams *params);

### gst_allocation_params_free ()

    void
    gst_allocation_params_free (GstAllocationParams *params);

### gst_allocator_alloc ()

    GstMemory *
    gst_allocator_alloc (GstAllocator *allocator,
                         gsize size,
                         GstAllocationParams *params);

### gst_allocator_free ()

    void
    gst_allocator_free (GstAllocator *allocator,
                        GstMemory *memory);

### gst_memory_new_wrapped ()

    GstMemory *
    gst_memory_new_wrapped (GstMemoryFlags flags,
                            gpointer data,
                            gsize maxsize,
                            gsize offset,
                            gsize size,
                            gpointer user_data,
                            GDestroyNotify notify);

## Types and Values

### gst_memory_alignment

    GST_EXPORT gsize gst_memory_alignment;

### GstAllocator

    typedef struct {
      GstMemoryMapFunction       mem_map;
      GstMemoryUnmapFunction     mem_unmap;

      GstMemoryCopyFunction      mem_copy;
      GstMemoryShareFunction     mem_share;
      GstMemoryIsSpanFunction    mem_is_span;

      GstMemoryMapFullFunction   mem_map_full;
      GstMemoryUnmapFullFunction mem_unmap_full;
    } GstAllocator;

### struct GstAllocatorClass

    struct GstAllocatorClass {
      GstObjectClass object_class;

      GstMemory *  (*alloc)      (GstAllocator *allocator, gsize size,
                                  GstAllocationParams *params);
      void         (*free)       (GstAllocator *allocator, GstMemory *memory);
    };

### enum GstAllocatorFlags

#### Members

GST_ALLOCATOR_FLAG_CUSTOM_ALLOC |  |
GST_ALLOCATOR_FLAG_LAST |  |

### struct GstAllocationParams

    struct GstAllocationParams {
      GstMemoryFlags flags;
      gsize          align;
      gsize          prefix;
      gsize          padding;
    };

### GST_ALLOCATOR_SYSMEM

    #define GST_ALLOCATOR_SYSMEM   "SystemMemory"