diff -r 71e347f905f2 -r 4a7fac7dd34a gstreamer_core/gst/gstchildproxy.c --- a/gstreamer_core/gst/gstchildproxy.c Fri Mar 19 09:35:09 2010 +0200 +++ b/gstreamer_core/gst/gstchildproxy.c Fri Apr 16 15:15:52 2010 +0300 @@ -467,7 +467,7 @@ /** * gst_child_proxy_child_removed: * @object: the parent object - * @child: the newly added child + * @child: the removed child * * Emits the "child-removed" signal. */ @@ -497,6 +497,8 @@ * * Will be emitted after the @object was added to the @child_proxy. */ + /* FIXME 0.11: use GST_TYPE_OBJECT as GstChildProxy only + * supports GstObjects */ signals[CHILD_ADDED] = g_signal_new ("child-added", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface, @@ -510,6 +512,8 @@ * * Will be emitted after the @object was removed from the @child_proxy. */ + /* FIXME 0.11: use GST_TYPE_OBJECT as GstChildProxy only + * supports GstObjects */ signals[CHILD_REMOVED] = g_signal_new ("child-removed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface, @@ -527,9 +531,10 @@ GType gst_child_proxy_get_type (void) { - static GType type = 0; + static volatile gsize type = 0; - if (G_UNLIKELY (type == 0)) { + if (g_once_init_enter (&type)) { + GType _type; static const GTypeInfo info = { sizeof (GstChildProxyInterface), gst_child_proxy_base_init, /* base_init */ @@ -541,9 +546,12 @@ 0, /* n_preallocs */ NULL /* instance_init */ }; - type = g_type_register_static (G_TYPE_INTERFACE, "GstChildProxy", &info, 0); - g_type_interface_add_prerequisite (type, GST_TYPE_OBJECT); + _type = + g_type_register_static (G_TYPE_INTERFACE, "GstChildProxy", &info, 0); + + g_type_interface_add_prerequisite (_type, GST_TYPE_OBJECT); + g_once_init_leave (&type, (gsize) _type); } return type; }