+2005-07-29 Wim Taymans <wim@fluendo.com>
+
+ * docs/design/part-gstghostpad.txt:
+ Small update.
+
+ * gst/gstbin.c: (unlink_pads), (gst_bin_add_func),
+ (gst_bin_remove_func):
+ Unlinking pads while holding the bin LOCK is not a good
+ idea.
+
+ * gst/gstpad.c: (gst_pad_class_init),
+ (gst_pad_link_check_hierarchy), (gst_pad_get_caps_unlocked),
+ (gst_pad_accept_caps), (gst_pad_set_caps), (gst_pad_send_event):
+ No prob setting template after creating the pad.
+
2005-07-29 Jan Schmidt <thaytan@mad.scientist.com>
* gst/gstbus.c: (gst_bus_set_flushing), (gst_bus_pop),
a) new GstProxyPad Y is created
b) Y direction is same as peer
c) Y target is set to peer
- d) X internal pad is set to Y
+ d) X internal pad is set to Y (X is parent of Y)
e) Y is activated in the same mode as X
f) core makes link from src to X
a) new GstProxyPad Y is created
b) Y direction is same as peer
c) Y target is set to peer
- d) X internal pad is set to Y
+ d) X internal pad is set to Y (X is parent of Y)
e) link is made from Y to X target (sink)
f) Y is activated in the same mode as X
g) core makes link from src to X
if (GST_FLAG_IS_SET (element, GST_ELEMENT_IS_SINK))
GST_FLAG_SET (bin, GST_ELEMENT_IS_SINK);
- /* unlink all linked pads */
- it = gst_element_iterate_pads (element);
- gst_iterator_foreach (it, (GFunc) unlink_pads, element);
- gst_iterator_free (it);
-
bin->children = g_list_prepend (bin->children, element);
bin->numchildren++;
bin->children_cookie++;
GST_UNLOCK (bin);
+ /* unlink all linked pads */
+ it = gst_element_iterate_pads (element);
+ gst_iterator_foreach (it, (GFunc) unlink_pads, element);
+ gst_iterator_free (it);
+
GST_CAT_DEBUG_OBJECT (GST_CAT_PARENTAGE, bin, "added element \"%s\"",
elem_name);
g_free (elem_name);
if (G_UNLIKELY (g_list_find (bin->children, element) == NULL))
goto not_in_bin;
- /* unlink all linked pads */
- it = gst_element_iterate_pads (element);
- gst_iterator_foreach (it, (GFunc) unlink_pads, element);
- gst_iterator_free (it);
-
/* now remove the element from the list of elements */
bin->children = g_list_remove (bin->children, element);
bin->numchildren--;
GST_FLAG_UNSET (bin, GST_ELEMENT_IS_SINK);
}
}
-
GST_UNLOCK (bin);
GST_CAT_INFO_OBJECT (GST_CAT_PARENTAGE, bin, "removed child \"%s\"",
elem_name);
g_free (elem_name);
+ /* unlink all linked pads */
+ it = gst_element_iterate_pads (element);
+ gst_iterator_foreach (it, (GFunc) unlink_pads, element);
+ gst_iterator_free (it);
+
gst_element_set_bus (element, NULL);
/* unlock any waiters for the state change. It is possible that
g_object_class_install_property (G_OBJECT_CLASS (klass), PAD_PROP_TEMPLATE,
g_param_spec_object ("template", "Template",
"The GstPadTemplate of this pad", GST_TYPE_PAD_TEMPLATE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_READWRITE));
#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_pad_save_thyself);