* @mem_copy: the implementation of the GstMemoryCopyFunction
* @mem_share: the implementation of the GstMemoryShareFunction
* @mem_is_span: the implementation of the GstMemoryIsSpanFunction
+ * @mem_unmap_full: the implementation of the GstMemoryUnmapFullFunction.
+ * Will be used instead of @mem_unmap if present. Since 1.6
*
* The #GstAllocator is used to create new memory.
*/
{
GstObject object;
- const gchar *mem_type;
+ const gchar *mem_type;
/*< public >*/
- GstMemoryMapFunction mem_map;
- GstMemoryUnmapFunction mem_unmap;
+ GstMemoryMapFunction mem_map;
+ GstMemoryUnmapFunction mem_unmap;
- GstMemoryCopyFunction mem_copy;
- GstMemoryShareFunction mem_share;
- GstMemoryIsSpanFunction mem_is_span;
+ GstMemoryCopyFunction mem_copy;
+ GstMemoryShareFunction mem_share;
+ GstMemoryIsSpanFunction mem_is_span;
+
+ GstMemoryUnmapFullFunction mem_unmap_full;
/*< private >*/
- gpointer _gst_reserved[GST_PADDING];
+ gpointer _gst_reserved[GST_PADDING - 1];
GstAllocatorPrivate *priv;
};
g_return_if_fail (info != NULL);
g_return_if_fail (info->memory == mem);
- mem->allocator->mem_unmap (mem);
+ if (mem->allocator->mem_unmap_full)
+ mem->allocator->mem_unmap_full (mem, info->flags);
+ else
+ mem->allocator->mem_unmap (mem);
gst_memory_unlock (mem, (GstLockFlags) info->flags);
}
* @mem: a #GstMemory
*
* Return the pointer previously retrieved with gst_memory_map().
- *
- * Returns: %TRUE on success.
*/
typedef void (*GstMemoryUnmapFunction) (GstMemory *mem);
/**
+ * GstMemoryUnmapFullFunction:
+ * @mem: a #GstMemory
+ * @flags: a #GstMapFlags
+ *
+ * Return the pointer previously retrieved with gst_memory_map() with @flags.
+ */
+typedef void (*GstMemoryUnmapFullFunction) (GstMemory *mem, GstMapFlags flags);
+
+/**
* GstMemoryCopyFunction:
* @mem: a #GstMemory
* @offset: an offset