From: Stefan Sauer Date: Thu, 9 Jan 2014 06:56:55 +0000 (+0100) Subject: gstobject: add FIXME and docs for the disabled notify on parent X-Git-Tag: 1.3.1~229 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=46b18f7a8b5765d934ce6034ef31e2d273264b17;p=platform%2Fupstream%2Fgstreamer.git gstobject: add FIXME and docs for the disabled notify on parent We haven't found a way to re-enable emitting notify and deep-notify for parent changes. Add a FIXME-2.0 and a doc blob on the property. See #693281. --- diff --git a/gst/gstobject.c b/gst/gstobject.c index ff4ae31..2d272c6 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -172,6 +172,15 @@ gst_object_class_init (GstObjectClass * klass) g_param_spec_string ("name", "Name", "The name of the object", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); + /** + * GstObject:parent: + * + * The parent of the object. Please note, that when changing the 'parent' + * property, we don't emit #GObject::notify and #GstObject::deep-notify + * signals due to locking issues. In some cases one can use + * #GstBin::element-added or #GstBin::element-removed signals on the parent to + * achieve a similar effect. + */ properties[PROP_PARENT] = g_param_spec_object ("parent", "Parent", "The parent of the object", GST_TYPE_OBJECT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); @@ -691,9 +700,11 @@ gst_object_set_parent (GstObject * object, GstObject * parent) gst_object_ref_sink (object); GST_OBJECT_UNLOCK (object); - /* FIXME, this does not work, the deep notify takes the lock from the parent - * object and deadlocks when the parent holds its lock when calling this - * function (like _element_add_pad()) */ + /* FIXME-2.0: this does not work, the deep notify takes the lock from the + * parent object and deadlocks when the parent holds its lock when calling + * this function (like _element_add_pad()), we need to use a GRecMutex + * for locking the parent instead. + */ /* g_object_notify_by_pspec ((GObject *)object, properties[PROP_PARENT]); */ return TRUE;