docs: Flesh out element and object macro accessor docs a bit
authorCarlos Rafael Giani <dv@pseudoterminal.org>
Thu, 10 Mar 2016 09:35:40 +0000 (10:35 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 10 Mar 2016 10:07:07 +0000 (10:07 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=763213

gst/gstelement.h
gst/gstobject.h

index c3d1cbd..f4bed31 100644 (file)
@@ -346,8 +346,9 @@ typedef enum
  * GST_ELEMENT_NAME:
  * @elem: A #GstElement to query
  *
- * Gets the name of this element. Use only in core as this is not
- * ABI-compatible. Others use gst_element_get_name()
+ * Gets the name of this element. This is not thread-safe by default
+ * (i.e. you will have to make sure the object lock is taken yourself).
+ * If in doubt use gst_element_get_name() instead.
  */
 #define GST_ELEMENT_NAME(elem)                  (GST_OBJECT_NAME(elem))
 
@@ -355,7 +356,9 @@ typedef enum
  * GST_ELEMENT_PARENT:
  * @elem: A #GstElement to query
  *
- * Get the parent object of this element.
+ * Get the parent object of this element. This is not thread-safe by default
+ * (i.e. you will have to make sure the object lock is taken yourself).
+ * If in doubt use gst_object_get_parent() instead.
  */
 #define GST_ELEMENT_PARENT(elem)                (GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem)))
 
@@ -363,7 +366,9 @@ typedef enum
  * GST_ELEMENT_BUS:
  * @elem: A #GstElement to query
  *
- * Get the message bus of this element.
+ * Get the message bus of this element. This is not thread-safe by default
+ * (i.e. you will have to make sure the object lock is taken yourself).
+ * If in doubt use gst_element_get_bus() instead.
  */
 #define GST_ELEMENT_BUS(elem)                   (GST_ELEMENT_CAST(elem)->bus)
 
@@ -371,7 +376,9 @@ typedef enum
  * GST_ELEMENT_CLOCK:
  * @elem: A #GstElement to query
  *
- * Get the clock of this element
+ * Get the clock of this element.This is not thread-safe by default
+ * (i.e. you will have to make sure it is safe yourself).
+ * If in doubt use gst_element_get_clock() instead.
  */
 #define GST_ELEMENT_CLOCK(elem)                 (GST_ELEMENT_CAST(elem)->clock)
 
index f5b9b36..ad033e8 100644 (file)
@@ -105,14 +105,18 @@ typedef enum
  * GST_OBJECT_NAME:
  * @obj: a #GstObject
  *
- * Get the name of this object
+ * Get the name of this object. This is not thread-safe by default
+ * (i.e. you will have to make sure the object lock is taken yourself).
+ * If in doubt use gst_object_get_name() instead.
  */
 #define GST_OBJECT_NAME(obj)            (GST_OBJECT_CAST(obj)->name)
 /**
  * GST_OBJECT_PARENT:
  * @obj: a #GstObject
  *
- * Get the parent of this object
+ * Get the parent of this object. This is not thread-safe by default
+ * (i.e. you will have to make sure the object lock is taken yourself).
+ * If in doubt use gst_object_get_parent() instead.
  */
 #define GST_OBJECT_PARENT(obj)          (GST_OBJECT_CAST(obj)->parent)