Commit d59d3300 authored by Wim Taymans's avatar Wim Taymans
Browse files

gst/gstbin.c: A latency query fails when one of the sinks fail.

Original commit message from CVS:
* gst/gstbin.c: (bin_query_latency_fold), (gst_bin_query):
A latency query fails when one of the sinks fail.
* gst/gstelement.c: (gst_element_set_base_time):
Improve debugging.
parent 04757dd2
2007-09-17 Wim Taymans <wim.taymans@gmail.com>
* gst/gstbin.c: (bin_query_latency_fold), (gst_bin_query):
A latency query fails when one of the sinks fail.
* gst/gstelement.c: (gst_element_set_base_time):
Improve debugging.
2007-09-17 Jan Schmidt - Sun Microsystems <jan.schmidt@sun.com>
* gst/gstbin.c: (gst_bin_continue_func):
......
......@@ -2998,8 +2998,6 @@ bin_query_latency_fold (GstElement * item, GValue * ret, QueryFold * fold)
GstClockTime min, max;
gboolean live;
g_value_set_boolean (ret, TRUE);
gst_query_parse_latency (fold->query, &live, &min, &max);
GST_DEBUG_OBJECT (item,
......@@ -3016,6 +3014,9 @@ bin_query_latency_fold (GstElement * item, GValue * ret, QueryFold * fold)
fold->max = max;
if (fold->live == FALSE)
fold->live = live;
} else {
g_value_set_boolean (ret, FALSE);
GST_DEBUG_OBJECT (item, "failed query");
}
gst_object_unref (item);
......@@ -3116,6 +3117,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
fold_func = (GstIteratorFoldFunction) bin_query_latency_fold;
fold_init = bin_query_min_max_init;
fold_done = bin_query_latency_done;
res = TRUE;
break;
}
default:
......@@ -3126,7 +3128,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
fold_data.query = query;
g_value_init (&ret, G_TYPE_BOOLEAN);
g_value_set_boolean (&ret, FALSE);
g_value_set_boolean (&ret, res);
iter = gst_bin_iterate_sinks (bin);
GST_DEBUG_OBJECT (bin, "Sending query %p (type %s) to sink children",
......@@ -3145,7 +3147,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
gst_iterator_resync (iter);
if (fold_init)
fold_init (bin, &fold_data);
g_value_set_boolean (&ret, FALSE);
g_value_set_boolean (&ret, res);
break;
case GST_ITERATOR_OK:
case GST_ITERATOR_DONE:
......
......@@ -478,14 +478,18 @@ gst_element_get_clock (GstElement * element)
void
gst_element_set_base_time (GstElement * element, GstClockTime time)
{
GstClockTime old;
g_return_if_fail (GST_IS_ELEMENT (element));
GST_OBJECT_LOCK (element);
old = element->base_time;
element->base_time = time;
GST_OBJECT_UNLOCK (element);
GST_CAT_DEBUG_OBJECT (GST_CAT_CLOCK, element,
"set base_time=%" GST_TIME_FORMAT, GST_TIME_ARGS (time));
"set base_time=%" GST_TIME_FORMAT ", old %" GST_TIME_FORMAT,
GST_TIME_ARGS (time), GST_TIME_ARGS (old));
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment