GST_CAT_DEBUG_OBJECT (GST_CAT_PARENTAGE, bin, "added element \"%s\"",
elem_name);
- g_free (elem_name);
g_signal_emit (bin, gst_bin_signals[ELEMENT_ADDED], 0, element);
- gst_child_proxy_child_added ((GObject *) bin, (GObject *) element);
+ gst_child_proxy_child_added ((GObject *) bin, (GObject *) element, elem_name);
+
+ g_free (elem_name);
return TRUE;
GST_CAT_INFO_OBJECT (GST_CAT_PARENTAGE, bin, "removed child \"%s\"",
elem_name);
- g_free (elem_name);
gst_element_set_bus (element, NULL);
GST_OBJECT_UNLOCK (element);
g_signal_emit (bin, gst_bin_signals[ELEMENT_REMOVED], 0, element);
- gst_child_proxy_child_removed ((GObject *) bin, (GObject *) element);
+ gst_child_proxy_child_removed ((GObject *) bin, (GObject *) element,
+ elem_name);
+ g_free (elem_name);
/* element is really out of our control now */
gst_object_unref (element);
* gst_child_proxy_child_added:
* @object: the parent object
* @child: the newly added child
+ * @name: the name of the new child
*
* Emits the "child-added" signal.
*/
void
-gst_child_proxy_child_added (GObject * object, GObject * child)
+gst_child_proxy_child_added (GObject * object, GObject * child,
+ const gchar * name)
{
- g_signal_emit (G_OBJECT (object), signals[CHILD_ADDED], 0, child);
+ g_signal_emit (G_OBJECT (object), signals[CHILD_ADDED], 0, child, name);
}
/**
* gst_child_proxy_child_removed:
* @object: the parent object
* @child: the removed child
+ * @name: the name of the old child
*
* Emits the "child-removed" signal.
*/
void
-gst_child_proxy_child_removed (GObject * object, GObject * child)
+gst_child_proxy_child_removed (GObject * object, GObject * child,
+ const gchar * name)
{
- g_signal_emit (G_OBJECT (object), signals[CHILD_REMOVED], 0, child);
+ g_signal_emit (G_OBJECT (object), signals[CHILD_REMOVED], 0, child, name);
}
/* gobject methods */
* GstChildProxy::child-added:
* @child_proxy: the #GstChildProxy
* @object: the #GObject that was added
+ * @name: the name of the new child
*
* Will be emitted after the @object was added to the @child_proxy.
*/
g_signal_new ("child-added", G_TYPE_FROM_CLASS (g_class),
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface,
child_added), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE,
- 1, G_TYPE_OBJECT);
+ 2, G_TYPE_OBJECT, G_TYPE_STRING);
/**
* GstChildProxy::child-removed:
* @child_proxy: the #GstChildProxy
* @object: the #GObject that was removed
+ * @name: the name of the old child
*
* Will be emitted after the @object was removed from the @child_proxy.
*/
g_signal_new ("child-removed", G_TYPE_FROM_CLASS (g_class),
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstChildProxyInterface,
child_removed), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE,
- 1, G_TYPE_OBJECT);
+ 2, G_TYPE_OBJECT, G_TYPE_STRING);
initialized = TRUE;
}