diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-12-02 21:21:48 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-02-23 10:34:08 +0100 |
commit | fda9686b35e0fd5ea9bbc6f9fbcd1856c7b102d1 (patch) | |
tree | 19d5e9b9315c1c087636dad173a8fa6705fa6126 /gst/gstcaps.h | |
parent | 086aac764d14378dea9ff3fc478381047570b319 (diff) | |
download | gstreamer-fda9686b35e0fd5ea9bbc6f9fbcd1856c7b102d1.tar.gz |
miniobject: work on making caps a boxed type
More work on making miniobject a simple allocated struct.
Diffstat (limited to 'gst/gstcaps.h')
-rw-r--r-- | gst/gstcaps.h | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/gst/gstcaps.h b/gst/gstcaps.h index c04cc45035..af12ec8f50 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -40,7 +40,7 @@ G_BEGIN_DECLS * Extra flags for a caps. */ typedef enum { - GST_CAPS_FLAGS_ANY = (1 << 0) + GST_CAPS_FLAGS_ANY = (GST_MINI_OBJECT_FLAG_LAST << 0) } GstCapsFlags; /** @@ -99,6 +99,14 @@ typedef enum { typedef struct _GstCaps GstCaps; typedef struct _GstStaticCaps GstStaticCaps; +/** + * GST_CAPS_FLAGS: + * @caps: a #GstCaps. + * + * A flags word containing #GstCapsFlags flags set on this caps. + */ +#define GST_CAPS_FLAGS(caps) GST_MINI_OBJECT_FLAGS(caps) + /* refcount */ /** * GST_CAPS_REFCOUNT: @@ -106,14 +114,39 @@ typedef struct _GstStaticCaps GstStaticCaps; * * Get access to the reference count field of the caps */ -#define GST_CAPS_REFCOUNT(caps) ((GST_CAPS(caps))->refcount) +#define GST_CAPS_REFCOUNT(caps) GST_MINI_OBJECT_REFCOUNT(caps) /** * GST_CAPS_REFCOUNT_VALUE: * @caps: a #GstCaps * * Get the reference count value of the caps. */ -#define GST_CAPS_REFCOUNT_VALUE(caps) (g_atomic_int_get (&(GST_CAPS(caps))->refcount)) +#define GST_CAPS_REFCOUNT_VALUE(caps) GST_MINI_OBJECT_REFCOUNT_VALUE(caps) + +/** + * GST_CAPS_FLAG_IS_SET: + * @caps: a #GstBuffer. + * @flag: the #GstBufferFlag to check. + * + * Gives the status of a specific flag on a caps. + */ +#define GST_CAPS_FLAG_IS_SET(caps,flag) GST_MINI_OBJECT_FLAG_IS_SET (caps, flag) +/** + * GST_CAPS_FLAG_SET: + * @caps: a #GstBuffer. + * @flag: the #GstBufferFlag to set. + * + * Sets a caps flag on a caps. + */ +#define GST_CAPS_FLAG_SET(caps,flag) GST_MINI_OBJECT_FLAG_SET (caps, flag) +/** + * GST_CAPS_FLAG_UNSET: + * @caps: a #GstBuffer. + * @flag: the #GstBufferFlag to clear. + * + * Clears a caps flag. + */ +#define GST_CAPS_FLAG_UNSET(caps,flag) GST_MINI_OBJECT_FLAG_UNSET (caps, flag) /** * GstCaps: |