[0.11] gstreamer: memory: add flags to the mapinfo

Wim Taymans wtay at kemper.freedesktop.org
Wed Jan 25 03:42:29 PST 2012


Module: gstreamer
Branch: 0.11
Commit: 9c9848e9525c382aee39b72314c0eb6669792550
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=9c9848e9525c382aee39b72314c0eb6669792550

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Tue Jan 24 14:37:25 2012 +0100

memory: add flags to the mapinfo

---

 gst/gstmemory.c |    1 +
 gst/gstmemory.h |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gst/gstmemory.c b/gst/gstmemory.c
index 83ef9fe..dd7c1d6 100644
--- a/gst/gstmemory.c
+++ b/gst/gstmemory.c
@@ -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;
diff --git a/gst/gstmemory.h b/gst/gstmemory.h
index 4300641..6cebb76 100644
--- a/gst/gstmemory.h
+++ b/gst/gstmemory.h
@@ -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:
  *



More information about the gstreamer-commits mailing list