memory: add flags to the mapinfo
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 24 Jan 2012 13:37:25 +0000 (14:37 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 25 Jan 2012 10:54:23 +0000 (11:54 +0100)
gst/gstmemory.c
gst/gstmemory.h

index 83ef9fe..dd7c1d6 100644 (file)
@@ -582,6 +582,7 @@ gst_memory_map (GstMemory * mem, GstMapInfo * info, GstMapFlags flags)
     goto error;
 
   info->memory = mem;
+  info->flags = flags;
   info->size = mem->size;
   info->maxsize = mem->maxsize - mem->offset;
   info->data = info->data + mem->offset;
index 4300641..6cebb76 100644 (file)
@@ -101,6 +101,7 @@ typedef enum {
 /**
  * GstMapInfo:
  * @memory: a pointer to the mapped memory
+ * @flags: flags used when mapping the memory
  * @data: a pointer to the mapped data
  * @size: the valid size in @data
  * @maxsize: the maximum bytes in @data
@@ -110,11 +111,14 @@ typedef enum {
  */
 typedef struct {
   GstMemory *memory;
+  GstMapFlags flags;
   guint8 *data;
   gsize size;
   gsize maxsize;
 } GstMapInfo;
 
+#define GST_MAP_INFO_INIT { NULL, 0, NULL, 0, 0 }
+
 /**
  * GST_MAP_READWRITE:
  *