From 5327545d5684e1f9b9ba38ce90fe84eb5454906a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 22 Feb 2013 12:41:09 +0100 Subject: [PATCH] memory: Add new memory flag to specify that memory can't be mapped --- docs/gst/gstreamer-sections.txt | 1 + gst/gstmemory.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 5bcf4a4..3c40c24 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -1322,6 +1322,7 @@ GST_MEMORY_IS_NO_SHARE GST_MEMORY_IS_ZERO_PADDED GST_MEMORY_IS_ZERO_PREFIXED GST_MEMORY_IS_PHYSICALLY_CONTINOUS +GST_MEMORY_IS_NOT_MAPPABLE GstMemory diff --git a/gst/gstmemory.h b/gst/gstmemory.h index 2981449..ca625e1 100644 --- a/gst/gstmemory.h +++ b/gst/gstmemory.h @@ -46,6 +46,7 @@ typedef struct _GstAllocator GstAllocator; * @GST_MEMORY_FLAG_ZERO_PREFIXED: the memory prefix is filled with 0 bytes * @GST_MEMORY_FLAG_ZERO_PADDED: the memory padding is filled with 0 bytes * @GST_MEMORY_FLAG_PHYSICALLY_CONTINOUS: the memory is physically continous. Since 1.2 + * @GST_MEMORY_FLAG_NOT_MAPPABLE: the memory can't be mapped via gst_memory_map() without any preconditions. Since 1.2 * @GST_MEMORY_FLAG_LAST: first flag that can be used for custom purposes * * Flags for wrapped memory. @@ -56,6 +57,7 @@ typedef enum { GST_MEMORY_FLAG_ZERO_PREFIXED = (GST_MINI_OBJECT_FLAG_LAST << 1), GST_MEMORY_FLAG_ZERO_PADDED = (GST_MINI_OBJECT_FLAG_LAST << 2), GST_MEMORY_FLAG_PHYSICALLY_CONTINOUS = (GST_MINI_OBJECT_FLAG_LAST << 3), + GST_MEMORY_FLAG_NOT_MAPPABLE = (GST_MINI_OBJECT_FLAG_LAST << 4), GST_MEMORY_FLAG_LAST = (GST_MINI_OBJECT_FLAG_LAST << 16) } GstMemoryFlags; @@ -124,6 +126,16 @@ typedef enum { #define GST_MEMORY_IS_PHYSICALLY_CONTINOUS(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_PHYSICALLY_CONTINOUS) /** + * GST_MEMORY_IS_NOT_MAPPABLE: + * @mem: a #GstMemory. + * + * Check if @mem can't be mapped via gst_memory_map() without any preconditions + * + * Since: 1.2 + */ +#define GST_MEMORY_IS_NOT_MAPPABLE(mem) GST_MEMORY_FLAG_IS_SET(mem,GST_MEMORY_FLAG_NOT_MAPPABLE) + +/** * GstMemory: * @mini_object: parent structure * @allocator: pointer to the #GstAllocator -- 2.7.4