+2004-04-20 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
+ * gst/autoplug/gstspider.c: (gst_spider_link_sometimes),
+ (gst_spider_identity_plug):
+ improve debugging messages
+ * gst/gstbin.c: (gst_bin_remove_func):
+ make sure the state_change function is only called with simple state
+ transitions
+
2004-04-20 Thomas Vander Stichele <thomas at apestaart dot org>
* Makefile.am:
{
gulong signal_id = conn->signal_id;
+ GST_INFO ("plugging from new sometimes pad %s:%s", GST_DEBUG_PAD_NAME (pad));
/* try to autoplug the elements */
if (gst_spider_plug_from_srcpad (conn, pad) != GST_PAD_LINK_REFUSED) {
GST_DEBUG ("%s:%s was autoplugged to %s:%s, removing callback",
while (factories) {
if ((padtemp =
gst_autoplug_can_connect_src (factories->data, src_caps))) {
- GST_DEBUG ("can connect src to pad template: %" GST_PTR_FORMAT,
+ GST_DEBUG ("can connect src to %s pad template: %" GST_PTR_FORMAT,
+ GST_PLUGIN_FEATURE_NAME (factories->data),
gst_pad_template_get_caps (padtemp));
found = TRUE;
}
gst_object_unparent (GST_OBJECT (element));
/* if we're down to zero children, force state to NULL */
- if (bin->numchildren == 0 && GST_ELEMENT_SCHED (bin) != NULL) {
- GST_STATE_PENDING (bin) = GST_STATE_NULL;
+ while (bin->numchildren == 0 && GST_ELEMENT_SCHED (bin) != NULL &&
+ GST_STATE (bin) > GST_STATE_NULL) {
+ GstElementState next = GST_STATE (bin) >> 1;
+
+ GST_STATE_PENDING (bin) = next;
gst_bin_change_state_norecurse (bin);
+ if (!GST_STATE (bin) == next) {
+ g_warning ("bin %s failed state change to %d", GST_ELEMENT_NAME (bin),
+ next);
+ break;
+ }
}
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);