gst/: remove now useless and leaky resurrection code in dispose

Original commit message from CVS:

* gst/gstbin.c: (gst_bin_dispose):
* gst/gstelement.c: (gst_element_dispose):
remove now useless and leaky resurrection code in dispose
* gst/base/gstbasesrc.c: (gst_base_src_init):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gstobject.c: (gst_object_set_parent):
add some debugging
This commit is contained in:
Thomas Vander Stichele 2005-09-27 18:33:48 +00:00
parent 1da84c7e67
commit daadaad81b
7 changed files with 28 additions and 13 deletions

View file

@ -1,3 +1,13 @@
2005-09-27 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gstbin.c: (gst_bin_dispose):
* gst/gstelement.c: (gst_element_dispose):
remove now useless and leaky resurrection code in dispose
* gst/base/gstbasesrc.c: (gst_base_src_init):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gstobject.c: (gst_object_set_parent):
add some debugging
2005-09-27 Wim Taymans <wim@fluendo.com>
* docs/design/part-TODO.txt:

View file

@ -189,8 +189,10 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "src");
g_return_if_fail (pad_template != NULL);
GST_DEBUG_OBJECT (basesrc, "creating src pad");
pad = gst_pad_new_from_template (pad_template, "src");
GST_DEBUG_OBJECT (basesrc, "setting functions on src pad");
gst_pad_set_activatepush_function (pad, gst_base_src_activate_push);
gst_pad_set_activatepull_function (pad, gst_base_src_activate_pull);
gst_pad_set_event_function (pad, gst_base_src_event_handler);
@ -200,8 +202,9 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
gst_pad_set_getcaps_function (pad, gst_base_src_getcaps);
gst_pad_set_setcaps_function (pad, gst_base_src_setcaps);
/* hold ref to pad */
/* hold pointer to pad */
basesrc->srcpad = pad;
GST_DEBUG_OBJECT (basesrc, "adding src pad");
gst_element_add_pad (GST_ELEMENT (basesrc), pad);
basesrc->segment_start = -1;
@ -211,6 +214,8 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
basesrc->clock_id = NULL;
GST_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED);
GST_DEBUG_OBJECT (basesrc, "init done");
}
static void

View file

@ -1449,9 +1449,6 @@ gst_bin_dispose (GObject * object)
GST_CAT_DEBUG_OBJECT (GST_CAT_REFCOUNTING, object, "dispose");
/* ref to not hit 0 again */
gst_object_ref (object);
g_list_free (bin->eosed);
bin->eosed = NULL;
gst_object_unref (bin->child_bus);

View file

@ -2091,9 +2091,6 @@ gst_element_dispose (GObject * object)
GST_CAT_INFO_OBJECT (GST_CAT_REFCOUNTING, element, "dispose");
/* ref so we don't hit 0 again */
gst_object_ref (object);
/* first we break all our links with the outside */
while (element->pads) {
gst_element_remove_pad (element, GST_PAD_CAST (element->pads->data));

View file

@ -367,10 +367,10 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
}
if (name)
GST_INFO ("creating \"%s\" named \"%s\"", GST_PLUGIN_FEATURE_NAME (factory),
GST_STR_NULL (name));
GST_INFO ("creating element \"%s\" named \"%s\"",
GST_PLUGIN_FEATURE_NAME (factory), GST_STR_NULL (name));
else
GST_INFO ("creating \"%s\"", GST_PLUGIN_FEATURE_NAME (factory));
GST_INFO ("creating element \"%s\"", GST_PLUGIN_FEATURE_NAME (factory));
#if 0
if (factory->type == 0) {
@ -397,7 +397,7 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
if (name)
gst_object_set_name (GST_OBJECT (element), name);
GST_DEBUG ("created \"%s\"", GST_PLUGIN_FEATURE_NAME (factory));
GST_DEBUG ("created element \"%s\"", GST_PLUGIN_FEATURE_NAME (factory));
return element;
}

View file

@ -861,7 +861,8 @@ gst_object_set_parent (GstObject * object, GstObject * parent)
g_return_val_if_fail (GST_IS_OBJECT (parent), FALSE);
g_return_val_if_fail (object != parent, FALSE);
GST_CAT_LOG_OBJECT (GST_CAT_REFCOUNTING, object, "set parent (ref and sink)");
GST_CAT_DEBUG_OBJECT (GST_CAT_REFCOUNTING, object,
"set parent (ref and sink)");
GST_LOCK (object);
if (G_UNLIKELY (object->parent != NULL))

View file

@ -189,8 +189,10 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "src");
g_return_if_fail (pad_template != NULL);
GST_DEBUG_OBJECT (basesrc, "creating src pad");
pad = gst_pad_new_from_template (pad_template, "src");
GST_DEBUG_OBJECT (basesrc, "setting functions on src pad");
gst_pad_set_activatepush_function (pad, gst_base_src_activate_push);
gst_pad_set_activatepull_function (pad, gst_base_src_activate_pull);
gst_pad_set_event_function (pad, gst_base_src_event_handler);
@ -200,8 +202,9 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
gst_pad_set_getcaps_function (pad, gst_base_src_getcaps);
gst_pad_set_setcaps_function (pad, gst_base_src_setcaps);
/* hold ref to pad */
/* hold pointer to pad */
basesrc->srcpad = pad;
GST_DEBUG_OBJECT (basesrc, "adding src pad");
gst_element_add_pad (GST_ELEMENT (basesrc), pad);
basesrc->segment_start = -1;
@ -211,6 +214,8 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
basesrc->clock_id = NULL;
GST_FLAG_UNSET (basesrc, GST_BASE_SRC_STARTED);
GST_DEBUG_OBJECT (basesrc, "init done");
}
static void