Group the extra allocation parameters in a GstAllocationParams structure to make
it easier to deal with them and so that we can extend them later if needed.
Make gst_buffer_new_allocate() take the GstAllocationParams for added
functionality.
Add boxed type for GstAllocationParams.
* ...
* size = width * height * bpp;
* buffer = gst_buffer_new ();
- * memory = gst_allocator_alloc (NULL, size, 0);
+ * memory = gst_allocator_alloc (NULL, size, NULL);
* gst_buffer_take_memory (buffer, -1, memory);
* ...
* </programlisting>
/**
* gst_buffer_new_allocate:
- * @allocator: (allow-none): the #GstAllocator to use, or NULL to use the
+ * @allocator: (transfer none) (allow-none): the #GstAllocator to use, or NULL to use the
* default allocator
* @size: the size in bytes of the new buffer's data.
- * @align: the alignment of the buffer memory
+ * @params: (transfer none) (allow-none): optional parameters
*
* Tries to create a newly allocated buffer with data of the given size and
- * alignment from @allocator. If the requested amount of memory can't be
+ * extra parameters from @allocator. If the requested amount of memory can't be
* allocated, NULL will be returned. The allocated buffer memory is not cleared.
*
* When @allocator is NULL, the default memory allocator will be used.
*
- * Allocator buffer memory will be aligned to multiples of (@align + 1) bytes.
- *
* Note that when @size == 0, the buffer will not have memory associated with it.
*
* MT safe.
* be allocated.
*/
GstBuffer *
-gst_buffer_new_allocate (GstAllocator * allocator, gsize size, gsize align)
+gst_buffer_new_allocate (GstAllocator * allocator, gsize size,
+ GstAllocationParams * params)
{
GstBuffer *newbuf;
GstMemory *mem;
#if 1
if (size > 0) {
- mem = gst_allocator_alloc (allocator, 0, size, 0, size, align);
+ mem = gst_allocator_alloc (allocator, size, params);
if (G_UNLIKELY (mem == NULL))
goto no_memory;
} else {
GstMapInfo dinfo;
guint8 *ptr;
- span = gst_allocator_alloc (NULL, 0, size, 0, size, 0);
+ span = gst_allocator_alloc (NULL, size, NULL);
gst_memory_map (span, &dinfo, GST_MAP_WRITE);
ptr = dinfo.data;
/* allocation */
GstBuffer * gst_buffer_new (void);
-GstBuffer * gst_buffer_new_allocate (GstAllocator * allocator, gsize size, gsize align);
+GstBuffer * gst_buffer_new_allocate (GstAllocator * allocator, gsize size,
+ GstAllocationParams * params);
GstBuffer * gst_buffer_new_wrapped_full (gpointer data, GFreeFunc free_func, gsize offset, gsize size);
GstBuffer * gst_buffer_new_wrapped (gpointer data, gsize size);
guint size;
guint min_buffers;
guint max_buffers;
- guint prefix;
- guint padding;
- guint align;
+ GstAllocationParams params;
};
enum
GstBufferPoolParams * params)
{
GstBufferPoolPrivate *priv = pool->priv;
- GstMemory *mem;
- gsize maxsize;
- *buffer = gst_buffer_new ();
-
- maxsize = priv->size + priv->prefix + priv->padding;
- mem = gst_allocator_alloc (NULL, 0, maxsize, priv->prefix,
- priv->size, priv->align);
- gst_buffer_take_memory (*buffer, -1, mem);
+ *buffer = gst_buffer_new_allocate (NULL, priv->size, &priv->params);
return GST_FLOW_OK;
}
priv->size = size;
priv->min_buffers = min_buffers;
priv->max_buffers = max_buffers;
- priv->prefix = prefix;
- priv->padding = padding;
- priv->align = align;
+ gst_allocation_params_init (&priv->params);
+ priv->params.prefix = prefix;
+ priv->params.padding = padding;
+ priv->params.align = align;
return TRUE;
//#define gst_buffer_create_sub(b,o,s) gst_buffer_copy_region(b,GST_BUFFER_COPY_ALL,o,s)
-#define gst_buffer_new_and_alloc(s) gst_buffer_new_allocate(NULL, s, 0)
+#define gst_buffer_new_and_alloc(s) gst_buffer_new_allocate(NULL, s, NULL)
#define GST_BUFFER_TIMESTAMP GST_BUFFER_PTS
#define GST_BUFFER_TIMESTAMP_IS_VALID GST_BUFFER_PTS_IS_VALID
G_DEFINE_BOXED_TYPE (GstAllocator, gst_allocator,
(GBoxedCopyFunc) gst_allocator_ref, (GBoxedFreeFunc) gst_allocator_unref);
+G_DEFINE_BOXED_TYPE (GstAllocationParams, gst_allocation_params,
+ (GBoxedCopyFunc) gst_allocation_params_copy,
+ (GBoxedFreeFunc) gst_allocation_params_free);
+
/**
* gst_memory_alignment:
*
static void
_default_mem_init (GstMemoryDefault * mem, GstMemoryFlags flags,
GstMemory * parent, gsize slice_size, gpointer data,
- gsize maxsize, gsize offset, gsize size, gpointer user_data,
- GDestroyNotify notify)
+ gsize maxsize, gsize offset, gsize size, gsize align,
+ gpointer user_data, GDestroyNotify notify)
{
mem->mem.allocator = _default_mem_impl;
mem->mem.flags = flags;
mem->mem.parent = parent ? gst_memory_ref (parent) : NULL;
mem->mem.state = (flags & GST_MEMORY_FLAG_READONLY ? 0x1 : 0);
mem->mem.maxsize = maxsize;
+ mem->mem.align = align;
mem->mem.offset = offset;
mem->mem.size = size;
mem->slice_size = slice_size;
/* create a new memory block that manages the given memory */
static GstMemoryDefault *
_default_mem_new (GstMemoryFlags flags, GstMemory * parent, gpointer data,
- gsize maxsize, gsize offset, gsize size, gpointer user_data,
+ gsize maxsize, gsize offset, gsize size, gsize align, gpointer user_data,
GDestroyNotify notify)
{
GstMemoryDefault *mem;
mem = g_slice_alloc (slice_size);
_default_mem_init (mem, flags, parent, slice_size,
- data, maxsize, offset, size, user_data, notify);
+ data, maxsize, offset, size, align, user_data, notify);
return mem;
}
data = (guint8 *) mem + sizeof (GstMemoryDefault);
+ /* do alignment */
if ((aoffset = ((guintptr) data & align))) {
aoffset = (align + 1) - aoffset;
data += aoffset;
memset (data + offset + size, 0, padding);
_default_mem_init (mem, flags, NULL, slice_size, data, maxsize,
- offset, size, NULL, NULL);
+ offset, size, align, NULL, NULL);
return mem;
}
static GstMemory *
-_default_alloc_alloc (GstAllocator * allocator, GstMemoryFlags flags,
- gsize maxsize, gsize offset, gsize size, gsize align, gpointer user_data)
+_default_alloc_alloc (GstAllocator * allocator, gsize size,
+ GstAllocationParams * params, gpointer user_data)
{
- return (GstMemory *) _default_mem_new_block (flags, maxsize, align, offset,
- size);
+ gsize maxsize = size + params->prefix + params->padding;
+
+ return (GstMemory *) _default_mem_new_block (params->flags,
+ maxsize, params->align, params->prefix, size);
}
static gpointer
sub =
_default_mem_new (parent->flags, parent, mem->data,
- mem->mem.maxsize, mem->mem.offset + offset, size, NULL, NULL);
+ mem->mem.maxsize, mem->mem.offset + offset, size, mem->mem.align, NULL,
+ NULL);
return sub;
}
{
GstMemory *copy;
GstMapInfo sinfo, dinfo;
+ GstAllocationParams params = { 0, 0, 0, mem->align, };
if (!gst_memory_map (mem, &sinfo, GST_MAP_READ))
return NULL;
size = sinfo.size > offset ? sinfo.size - offset : 0;
/* use the same allocator as the memory we copy */
- copy = gst_allocator_alloc (mem->allocator, 0, size, 0, size, mem->align);
+ copy = gst_allocator_alloc (mem->allocator, size, ¶ms);
if (!gst_memory_map (copy, &dinfo, GST_MAP_WRITE)) {
GST_CAT_WARNING (GST_CAT_MEMORY, "could not write map memory %p", copy);
gst_memory_unmap (mem, &sinfo);
g_return_val_if_fail (offset + size <= maxsize, NULL);
mem =
- _default_mem_new (flags, NULL, data, maxsize, offset, size, user_data,
+ _default_mem_new (flags, NULL, data, maxsize, offset, size, 0, user_data,
notify);
#ifndef GST_DISABLE_TRACE
gst_allocator_unref (old);
}
+/**
+ * gst_allocation_params_init:
+ * @params: a #GstAllocationParams
+ *
+ * Initialize @params to its default values
+ */
+void
+gst_allocation_params_init (GstAllocationParams * params)
+{
+ g_return_if_fail (params != NULL);
+
+ memset (params, 0, sizeof (GstAllocationParams));
+}
+
+/**
+ * gst_allocation_params_copy:
+ * @params: (transfer none): a #GstAllocationParams
+ *
+ * Create a copy of @params.
+ *
+ * Free-function: gst_allocation_params_free
+ *
+ * Returns: (transfer full): a new ##GstAllocationParams, free with
+ * gst_allocation_params_free().
+ */
+GstAllocationParams *
+gst_allocation_params_copy (const GstAllocationParams * params)
+{
+ GstAllocationParams *result = NULL;
+
+ if (params) {
+ result =
+ (GstAllocationParams *) g_slice_copy (sizeof (GstAllocationParams),
+ params);
+ }
+ return result;
+}
+
+/**
+ * gst_allocation_params_free:
+ * @params: (in) (transfer full): a #GstAllocationParams
+ *
+ * Free @params
+ */
+void
+gst_allocation_params_free (GstAllocationParams * params)
+{
+ g_slice_free (GstAllocationParams, params);
+}
+
/**
* gst_allocator_alloc:
* @allocator: (transfer none) (allow-none): a #GstAllocator to use
- * @flags: the flags
- * @maxsize: allocated size of @data
- * @offset: offset in allocated memory
- * @size: size of visible
- * @align: alignment for the data
+ * @size: size of the visible memory area
+ * @params: (transfer none) (allow-none): optional parameters
*
* Use @allocator to allocate a new memory block with memory that is at least
- * @maxsize big and has the given alignment.
+ * @size big.
*
- * @offset and @size describe the start and size of the accessible memory.
+ * The optional @params can specify the prefix and padding for the memory. If
+ * NULL is passed, no flags, no extra prefix/padding and a default alignment is
+ * used.
*
- * The prefix/padding will be filled with 0 if @flags contains
+ * The prefix/padding will be filled with 0 if flags contains
* #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively.
*
* When @allocator is NULL, the default allocator will be used.
*
- * @align is given as a bitmask so that @align + 1 equals the amount of bytes to
- * align to. For example, to align to 8 bytes, use an alignment of 7.
+ * The alignment in @params is given as a bitmask so that @align + 1 equals
+ * the amount of bytes to align to. For example, to align to 8 bytes,
+ * use an alignment of 7.
*
* Returns: (transfer full): a new #GstMemory.
*/
GstMemory *
-gst_allocator_alloc (GstAllocator * allocator, GstMemoryFlags flags,
- gsize maxsize, gsize offset, gsize size, gsize align)
+gst_allocator_alloc (GstAllocator * allocator, gsize size,
+ GstAllocationParams * params)
{
GstMemory *mem;
+ static GstAllocationParams defparams = { 0, 0, 0, 0, };
- g_return_val_if_fail (((align + 1) & align) == 0, NULL);
+ if (params) {
+ g_return_val_if_fail (((params->align + 1) & params->align) == 0, NULL);
+ } else {
+ params = &defparams;
+ }
if (allocator == NULL)
allocator = _default_allocator;
- mem = allocator->info.alloc (allocator, flags, maxsize, offset, size,
- align, allocator->user_data);
+ mem = allocator->info.alloc (allocator, size, params, allocator->user_data);
+
#ifndef GST_DISABLE_TRACE
_gst_alloc_trace_new (_gst_memory_trace, mem);
#endif
#define GST_TYPE_ALLOCATOR (gst_allocator_get_type())
GType gst_allocator_get_type(void);
+#define GST_TYPE_ALLOCATOR_PARAMS (gst_allocation_params_get_type())
+GType gst_allocation_params_get_type(void);
+
typedef struct _GstMemory GstMemory;
typedef struct _GstMemoryInfo GstMemoryInfo;
typedef struct _GstAllocator GstAllocator;
+typedef struct _GstAllocationParams GstAllocationParams;
GST_EXPORT gsize gst_memory_alignment;
*/
#define GST_ALLOCATOR_SYSMEM "SystemMemory"
+/**
+ * GstAllocationParams:
+ * @flags: flags to control allocation
+ * @align: the desired alignment of the memory
+ * @prefix: the disired prefix
+ * @padding: the desired padding
+ *
+ * Parameters to control the allocation of memory
+ */
+struct _GstAllocationParams {
+ GstMemoryFlags flags;
+ gsize align;
+ gsize prefix;
+ gsize padding;
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING];
+};
+
/**
* GstAllocatorAllocFunction:
* @allocator: a #GstAllocator
- * @flags: the flags
- * @maxsize: the maxsize
- * @offset: the offset
* @size: the size
- * @align: the alignment
+ * @params: allocator params
* @user_data: user data
*
- * Allocate a new #GstMemory from @allocator that can hold at least @maxsize bytes
- * and is aligned to (@align + 1) bytes.
+ * Allocate a new #GstMemory from @allocator that can hold at least @size
+ * bytes (+ padding) and is aligned to (@align + 1) bytes.
*
* The offset and size of the memory should be set and the prefix/padding must
- * be filled with 0 if @flags contains #GST_MEMORY_FLAG_ZERO_PREFIXED and
+ * be filled with 0 if @params flags contains #GST_MEMORY_FLAG_ZERO_PREFIXED and
* #GST_MEMORY_FLAG_ZERO_PADDED respectively.
*
* @user_data is the data that was used when creating @allocator.
* Returns: a newly allocated #GstMemory. Free with gst_memory_unref()
*/
typedef GstMemory * (*GstAllocatorAllocFunction) (GstAllocator *allocator,
- GstMemoryFlags flags,
- gsize maxsize, gsize offset,
- gsize size, gsize align,
+ gsize size, GstAllocationParams *params,
gpointer user_data);
/**
void gst_allocator_set_default (GstAllocator * allocator);
/* allocating memory blocks */
-GstMemory * gst_allocator_alloc (GstAllocator * allocator, GstMemoryFlags flags,
- gsize maxsize, gsize offset, gsize size,
- gsize align);
+void gst_allocation_params_init (GstAllocationParams *params);
+GstAllocationParams *
+ gst_allocation_params_copy (const GstAllocationParams *params) G_GNUC_MALLOC;
+void gst_allocation_params_free (GstAllocationParams *params);
+
+GstMemory * gst_allocator_alloc (GstAllocator * allocator, gsize size,
+ GstAllocationParams *params);
GstMemory * gst_memory_new_wrapped (GstMemoryFlags flags, gpointer data, gsize maxsize,
gsize offset, gsize size, gpointer user_data,
if (len & 1)
goto wrong_length;
- buffer = gst_buffer_new_allocate (NULL, len / 2, 0);
+ buffer = gst_buffer_new_allocate (NULL, len / 2, NULL);
if (!gst_buffer_map (buffer, &info, GST_MAP_WRITE))
goto map_failed;
data = info.data;
GstBufferPool *pool;
GstAllocator *allocator;
- guint prefix;
- guint padding;
- guint alignment;
+ GstAllocationParams params;
};
static GstElementClass *parent_class = NULL;
if (priv->pool) {
ret = gst_buffer_pool_acquire_buffer (priv->pool, buffer, NULL);
} else if (size != -1) {
- GstMemory *mem;
- guint maxsize;
-
- maxsize = size + priv->prefix + priv->padding;
-
- mem = gst_allocator_alloc (priv->allocator, 0, maxsize, priv->prefix,
- size, priv->alignment);
- if (G_UNLIKELY (mem == NULL))
- goto alloc_failed;
-
- *buffer = gst_buffer_new ();
+ *buffer = gst_buffer_new_allocate (priv->allocator, size, &priv->params);
if (G_UNLIKELY (*buffer == NULL))
- goto buffer_failed;
-
- gst_buffer_take_memory (*buffer, -1, mem);
+ goto alloc_failed;
ret = GST_FLOW_OK;
} else {
GST_ERROR_OBJECT (src, "Failed to allocate %u bytes", size);
return GST_FLOW_ERROR;
}
-buffer_failed:
- {
- GST_ERROR_OBJECT (src, "Failed to allocate buffer");
- return GST_FLOW_ERROR;
- }
}
static GstFlowReturn
oldalloc = priv->allocator;
priv->allocator = allocator;
- priv->prefix = prefix;
- priv->padding = padding;
- priv->alignment = alignment;
+ gst_allocation_params_init (&priv->params);
+ priv->params.prefix = prefix;
+ priv->params.padding = padding;
+ priv->params.align = alignment;
GST_OBJECT_UNLOCK (basesrc);
if (oldpool) {
GstBufferPool *pool;
gboolean pool_active;
GstAllocator *allocator;
- guint prefix;
- guint padding;
- guint alignment;
+ GstAllocationParams params;
GstQuery *query;
};
priv->allocator = allocator;
oldquery = priv->query;
priv->query = query;
- priv->prefix = prefix;
- priv->padding = padding;
- priv->alignment = alignment;
+ gst_allocation_params_init (&priv->params);
+ priv->params.prefix = prefix;
+ priv->params.padding = padding;
+ priv->params.align = alignment;
GST_OBJECT_UNLOCK (trans);
if (oldpool) {
GstFlowReturn ret = GST_FLOW_OK;
GstBaseTransformClass *bclass;
GstCaps *incaps, *outcaps;
- gsize insize, outsize, maxsize;
- GstMemory *mem;
+ gsize insize, outsize;
gboolean res;
priv = trans->priv;
goto unknown_size;
GST_DEBUG_OBJECT (trans, "doing alloc of size %" G_GSIZE_FORMAT, outsize);
- maxsize = outsize + priv->prefix + priv->padding;
- mem = gst_allocator_alloc (priv->allocator, 0, maxsize, priv->prefix,
- outsize, priv->alignment);
-
- *outbuf = gst_buffer_new ();
- gst_buffer_take_memory (*outbuf, -1, mem);
+ *outbuf = gst_buffer_new_allocate (priv->allocator, outsize, &priv->params);
copy_meta:
/* copy the metadata */
{
GstBuffer *buf;
- buf = gst_buffer_new_allocate (NULL, src->parentsize, 0);
+ buf = gst_buffer_new_allocate (NULL, src->parentsize, NULL);
src->parent = buf;
src->parentoffset = 0;
blocksize = GST_BASE_SRC (src)->blocksize;
/* create the buffer */
- buf = gst_buffer_new_allocate (NULL, blocksize, 0);
+ buf = gst_buffer_new_allocate (NULL, blocksize, NULL);
if (G_UNLIKELY (buf == NULL))
goto alloc_failed;
GstFlowReturn ret = GST_FLOW_OK;
/* allocate the output buffer of the requested size */
- buf = gst_buffer_new_allocate (NULL, length, 0);
+ buf = gst_buffer_new_allocate (NULL, length, NULL);
gst_buffer_map (buf, &info, GST_MAP_WRITE);
data = info.data;
gsize size, maxsize, offset;
/* one memory block */
- buf = gst_buffer_new_allocate (NULL, 100, 0);
+ buf = gst_buffer_new_allocate (NULL, 100, NULL);
size = gst_buffer_get_sizes (buf, &offset, &maxalloc);
fail_unless (size == 100);
fail_unless (maxsize == maxalloc);
/* new memory */
- mem = gst_allocator_alloc (NULL, 0, 100, 0, 100, 0);
+ mem = gst_allocator_alloc (NULL, 100, NULL);
size = gst_memory_get_sizes (mem, &offset, &maxalloc2);
fail_unless (size == 100);
fail_unless (offset == 0);
fail_unless (maxalloc == 80 + (maxalloc2 - 20));
/* appending an empty block */
- mem = gst_allocator_alloc (NULL, 0, 100, 0, 100, 0);
+ mem = gst_allocator_alloc (NULL, 100, NULL);
size = gst_memory_get_sizes (mem, &offset, &maxalloc3);
gst_memory_resize (mem, 0, 0);
gst_buffer_take_memory (buf, -1, mem);
fail_unless (maxalloc == 80 + (maxalloc2 - 20) + maxalloc3);
/* prepending an empty block */
- mem = gst_allocator_alloc (NULL, 0, 100, 0, 100, 0);
+ mem = gst_allocator_alloc (NULL, 100, NULL);
size = gst_memory_get_sizes (mem, &offset, &maxalloc4);
gst_memory_resize (mem, 0, 0);
gst_buffer_take_memory (buf, 0, mem);
gsize size, maxsize, offset;
/* one memory block */
- buf = gst_buffer_new_allocate (NULL, 100, 0);
+ buf = gst_buffer_new_allocate (NULL, 100, NULL);
size = gst_buffer_get_sizes (buf, &offset, &maxalloc);
fail_unless (size == 100);
gsize size, offset;
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1, gst_allocator_alloc (NULL, 0, 50, 0, 50, 0));
- gst_buffer_take_memory (buf, -1, gst_allocator_alloc (NULL, 0, 50, 0, 50, 0));
+ gst_buffer_take_memory (buf, -1, gst_allocator_alloc (NULL, 50, NULL));
+ gst_buffer_take_memory (buf, -1, gst_allocator_alloc (NULL, 50, NULL));
size = gst_buffer_get_sizes (buf, &offset, &maxalloc);
fail_unless (size == 100);
GstMemory *memory, *sub;
GstMapInfo info, sinfo;
- memory = gst_allocator_alloc (NULL, 0, 4, 0, 4, 0);
+ memory = gst_allocator_alloc (NULL, 4, NULL);
/* check sizes, memory starts out empty */
fail_unless (gst_memory_map (memory, &info, GST_MAP_WRITE));
{
GstMemory *memory, *sub1, *sub2;
- memory = gst_allocator_alloc (NULL, 0, 4, 0, 4, 0);
+ memory = gst_allocator_alloc (NULL, 4, NULL);
sub1 = gst_memory_share (memory, 0, 2);
fail_if (sub1 == NULL, "share of memory returned NULL");
GstMemory *memory, *copy;
GstMapInfo info, sinfo;
- memory = gst_allocator_alloc (NULL, 0, 4, 0, 4, 0);
+ memory = gst_allocator_alloc (NULL, 4, NULL);
ASSERT_MEMORY_REFCOUNT (memory, "memory", 1);
copy = gst_memory_copy (memory, 0, -1);
gst_memory_unref (copy);
gst_memory_unref (memory);
- memory = gst_allocator_alloc (NULL, 0, 0, 0, 0, 0);
+ memory = gst_allocator_alloc (NULL, 0, NULL);
fail_unless (gst_memory_map (memory, &info, GST_MAP_READ));
fail_unless (info.size == 0);
gst_memory_unmap (memory, &info);
GstMapInfo info;
gsize size;
- mem = gst_allocator_alloc (NULL, 0, 0, 0, 0, 0);
+ mem = gst_allocator_alloc (NULL, 0, NULL);
fail_unless (mem != NULL);
fail_unless (gst_memory_map (mem, &info, GST_MAP_READ));
fail_unless (info.size == 0);
/* normal alloc should still work */
size = 640 * 480 * 4;
- mem = gst_allocator_alloc (NULL, 0, size, 0, size, 0);
+ mem = gst_allocator_alloc (NULL, size, NULL);
fail_unless (mem != NULL);
fail_unless (gst_memory_map (mem, &info, GST_MAP_WRITE));
fail_unless (info.data != NULL);
gsize size, maxsize, offset;
/* one memory block */
- mem = gst_allocator_alloc (NULL, 0, 100, 0, 100, 0);
+ mem = gst_allocator_alloc (NULL, 100, NULL);
size = gst_memory_get_sizes (mem, &offset, &maxalloc);
fail_unless (size == 100);
gsize size, offset;
/* one memory block */
- mem = gst_allocator_alloc (NULL, 0, 100, 0, 100, 0);
+ mem = gst_allocator_alloc (NULL, 100, NULL);
size = gst_memory_get_sizes (mem, &offset, &maxalloc);
fail_unless (size == 100);
GstMemory *mem;
GstMapInfo info1, info2;
- mem = gst_allocator_alloc (NULL, 0, 100, 0, 100, 0);
+ mem = gst_allocator_alloc (NULL, 100, NULL);
/* nested mapping */
fail_unless (gst_memory_map (mem, &info1, GST_MAP_READ));
GstMapInfo info;
gsize size, maxalloc, offset;
- mem = gst_allocator_alloc (NULL, 0, 100, 0, 100, 0);
+ mem = gst_allocator_alloc (NULL, 100, NULL);
/* do mapping */
fail_unless (gst_memory_map (mem, &info, GST_MAP_READ));
_gst_sample_type DATA
_gst_structure_type DATA
_gst_trace_mutex DATA
+ gst_allocation_params_copy
+ gst_allocation_params_free
+ gst_allocation_params_get_type
+ gst_allocation_params_init
gst_allocator_alloc
gst_allocator_find
gst_allocator_get_memory_type