mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +00:00
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.
This commit is contained in:
parent
04757dd2d3
commit
d59d330076
3 changed files with 19 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2007-09-17 Jan Schmidt - Sun Microsystems <jan.schmidt@sun.com>
|
||||||
|
|
||||||
* gst/gstbin.c: (gst_bin_continue_func):
|
* gst/gstbin.c: (gst_bin_continue_func):
|
||||||
|
|
10
gst/gstbin.c
10
gst/gstbin.c
|
@ -2998,8 +2998,6 @@ bin_query_latency_fold (GstElement * item, GValue * ret, QueryFold * fold)
|
||||||
GstClockTime min, max;
|
GstClockTime min, max;
|
||||||
gboolean live;
|
gboolean live;
|
||||||
|
|
||||||
g_value_set_boolean (ret, TRUE);
|
|
||||||
|
|
||||||
gst_query_parse_latency (fold->query, &live, &min, &max);
|
gst_query_parse_latency (fold->query, &live, &min, &max);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (item,
|
GST_DEBUG_OBJECT (item,
|
||||||
|
@ -3016,6 +3014,9 @@ bin_query_latency_fold (GstElement * item, GValue * ret, QueryFold * fold)
|
||||||
fold->max = max;
|
fold->max = max;
|
||||||
if (fold->live == FALSE)
|
if (fold->live == FALSE)
|
||||||
fold->live = live;
|
fold->live = live;
|
||||||
|
} else {
|
||||||
|
g_value_set_boolean (ret, FALSE);
|
||||||
|
GST_DEBUG_OBJECT (item, "failed query");
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_object_unref (item);
|
gst_object_unref (item);
|
||||||
|
@ -3116,6 +3117,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
|
||||||
fold_func = (GstIteratorFoldFunction) bin_query_latency_fold;
|
fold_func = (GstIteratorFoldFunction) bin_query_latency_fold;
|
||||||
fold_init = bin_query_min_max_init;
|
fold_init = bin_query_min_max_init;
|
||||||
fold_done = bin_query_latency_done;
|
fold_done = bin_query_latency_done;
|
||||||
|
res = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -3126,7 +3128,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
|
||||||
fold_data.query = query;
|
fold_data.query = query;
|
||||||
|
|
||||||
g_value_init (&ret, G_TYPE_BOOLEAN);
|
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);
|
iter = gst_bin_iterate_sinks (bin);
|
||||||
GST_DEBUG_OBJECT (bin, "Sending query %p (type %s) to sink children",
|
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);
|
gst_iterator_resync (iter);
|
||||||
if (fold_init)
|
if (fold_init)
|
||||||
fold_init (bin, &fold_data);
|
fold_init (bin, &fold_data);
|
||||||
g_value_set_boolean (&ret, FALSE);
|
g_value_set_boolean (&ret, res);
|
||||||
break;
|
break;
|
||||||
case GST_ITERATOR_OK:
|
case GST_ITERATOR_OK:
|
||||||
case GST_ITERATOR_DONE:
|
case GST_ITERATOR_DONE:
|
||||||
|
|
|
@ -478,14 +478,18 @@ gst_element_get_clock (GstElement * element)
|
||||||
void
|
void
|
||||||
gst_element_set_base_time (GstElement * element, GstClockTime time)
|
gst_element_set_base_time (GstElement * element, GstClockTime time)
|
||||||
{
|
{
|
||||||
|
GstClockTime old;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_ELEMENT (element));
|
g_return_if_fail (GST_IS_ELEMENT (element));
|
||||||
|
|
||||||
GST_OBJECT_LOCK (element);
|
GST_OBJECT_LOCK (element);
|
||||||
|
old = element->base_time;
|
||||||
element->base_time = time;
|
element->base_time = time;
|
||||||
GST_OBJECT_UNLOCK (element);
|
GST_OBJECT_UNLOCK (element);
|
||||||
|
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_CLOCK, 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue