summaryrefslogtreecommitdiff
path: root/gst/gstobject.h
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2005-10-12 14:28:39 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2005-10-12 14:28:39 +0000
commita98aef82db6f931a27b78cd598db95b3fef230a3 (patch)
treef608fe39e6f509c18802f1564abd2abdec20fc43 /gst/gstobject.h
parent427aa6001467076fb0b69434314dd2e2e10273ae (diff)
renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition
Original commit message from CVS: * check/gst/gstbin.c: (GST_START_TEST): * docs/gst/gstreamer-sections.txt: * gst/base/gstbasesink.c: (gst_base_sink_init): * gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_get_range), (gst_base_src_check_get_range), (gst_base_src_start), (gst_base_src_stop): * gst/base/gstbasesrc.h: * gst/elements/gstfakesrc.c: (gst_fake_src_set_property): * gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func), (bin_element_is_sink), (reset_degree), (gst_bin_element_set_state), (bin_bus_handler): * gst/gstbin.h: * gst/gstbuffer.h: * gst/gstbus.c: (gst_bus_post), (gst_bus_set_flushing): * gst/gstbus.h: * gst/gstelement.c: (gst_element_is_locked_state), (gst_element_set_locked_state), (gst_element_commit_state), (gst_element_set_state): * gst/gstelement.h: * gst/gstindex.c: (gst_index_init): * gst/gstindex.h: * gst/gstminiobject.h: * gst/gstobject.c: (gst_object_init), (gst_object_sink), (gst_object_set_parent): * gst/gstobject.h: * gst/gstpad.c: (gst_pad_set_blocked_async), (gst_pad_is_blocked), (gst_pad_get_caps_unlocked), (gst_pad_set_caps): * gst/gstpad.h: * gst/gstpadtemplate.h: * gst/gstpipeline.c: (gst_pipeline_provide_clock_func), (gst_pipeline_use_clock), (gst_pipeline_auto_clock): * gst/gstpipeline.h: * gst/indexers/gstfileindex.c: (gst_file_index_load), (gst_file_index_commit): * testsuite/bytestream/filepadsink.c: (gst_fp_sink_init): * testsuite/pad/link.c: (gst_test_src_init), (gst_test_filter_init), (gst_test_sink_init): * testsuite/states/locked.c: (main): renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition
Diffstat (limited to 'gst/gstobject.h')
-rw-r--r--gst/gstobject.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/gst/gstobject.h b/gst/gstobject.h
index 8e4d36a974..173adebf60 100644
--- a/gst/gstobject.h
+++ b/gst/gstobject.h
@@ -58,10 +58,10 @@ GST_EXPORT GType _gst_object_type;
*/
typedef enum
{
- GST_OBJECT_DISPOSING = 0,
- GST_OBJECT_FLOATING,
-
- GST_OBJECT_FLAG_LAST = 4
+ GST_OBJECT_DISPOSING = (1<<0),
+ GST_OBJECT_FLOATING = (1<<1),
+ /* padding */
+ GST_OBJECT_FLAG_LAST = (1<<4)
} GstObjectFlags;
#ifdef GST_HAVE_GLIB_2_8
@@ -136,37 +136,36 @@ typedef enum
/**
- * GST_FLAGS:
+ * GST_OBJECT_FLAGS:
* @obj: Object to return flags for.
*
* This macro returns the entire set of flags for the object.
*/
-#define GST_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
-/* for the flags we double-not to make them comparable to TRUE and FALSE */
+#define GST_OBJECT_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
/**
- * GST_FLAG_IS_SET:
+ * GST_OBJECT_FLAG_IS_SET:
* @obj: Object to check for flags.
- * @flag: Flag to check for, must be a single bit in guint32.
+ * @flag: Flag to check for
*
* This macro checks to see if the given flag is set.
*/
-#define GST_FLAG_IS_SET(obj,flag) (!!(GST_FLAGS (obj) & (1<<(flag))))
+#define GST_OBJECT_FLAG_IS_SET(obj,flag) (GST_OBJECT_FLAGS (obj) & (flag))
/**
- * GST_FLAG_SET:
+ * GST_OBJECT_FLAG_SET:
* @obj: Object to set flag in.
- * @flag: Flag to set, can by any number of bits in guint32.
+ * @flag: Flag to set
*
* This macro sets the given bits.
*/
-#define GST_FLAG_SET(obj,flag) (GST_FLAGS (obj) |= (1<<(flag)))
+#define GST_OBJECT_FLAG_SET(obj,flag) (GST_OBJECT_FLAGS (obj) |= (flag))
/**
- * GST_FLAG_UNSET:
+ * GST_OBJECT_FLAG_UNSET:
* @obj: Object to unset flag in.
- * @flag: Flag to set, must be a single bit in guint32.
+ * @flag: Flag to set
*
* This macro usets the given bits.
*/
-#define GST_FLAG_UNSET(obj,flag) (GST_FLAGS (obj) &= ~(1<<(flag)))
+#define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) &= ~(flag))
/**
@@ -175,14 +174,14 @@ typedef enum
*
* Check if the given object is beeing destroyed.
*/
-#define GST_OBJECT_IS_DISPOSING(obj) (GST_FLAG_IS_SET (obj, GST_OBJECT_DISPOSING))
+#define GST_OBJECT_IS_DISPOSING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_DISPOSING))
/**
* GST_OBJECT_IS_FLOATING:
* @obj:Object to check
*
* Check if the given object is floating (has no owner).
*/
-#define GST_OBJECT_IS_FLOATING(obj) (GST_FLAG_IS_SET (obj, GST_OBJECT_FLOATING))
+#define GST_OBJECT_IS_FLOATING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_FLOATING))
typedef struct _GstObject GstObject;
typedef struct _GstObjectClass GstObjectClass;