+2007-02-28 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstbin.c: (bin_query_min_max_init), (bin_query_latency_fold),
+ (bin_query_latency_done):
+ Also report the live parameter of a latency query.
+
2007-02-28 Thomas Vander Stichele <thomas at apestaart dot org>
* tests/check/generic/states.c: (GST_START_TEST), (states_suite):
GstQuery *query;
gint64 min;
gint64 max;
+ gboolean live;
} QueryFold;
typedef void (*QueryInitFunction) (GstBin * bin, QueryFold * fold);
{
fold->min = 0;
fold->max = -1;
+ fold->live = FALSE;
}
static gboolean
{
if (gst_element_query (item, fold->query)) {
GstClockTime min, max;
+ gboolean live;
g_value_set_boolean (ret, TRUE);
- gst_query_parse_latency (fold->query, NULL, &min, &max);
+ gst_query_parse_latency (fold->query, &live, &min, &max);
GST_DEBUG_OBJECT (item,
- "got latency min %" GST_TIME_FORMAT ", max %" GST_TIME_FORMAT,
- GST_TIME_ARGS (min), GST_TIME_ARGS (max));
+ "got latency min %" GST_TIME_FORMAT ", max %" GST_TIME_FORMAT
+ ", live %d", GST_TIME_ARGS (min), GST_TIME_ARGS (max), live);
/* for the combined latency we collect the MAX of all min latencies and
* the MIN of all max latencies */
fold->max = max;
else if (max < fold->max)
fold->max = max;
+ if (fold->live == FALSE)
+ fold->live = live;
}
gst_object_unref (item);
bin_query_latency_done (GstBin * bin, QueryFold * fold)
{
/* store max in query result */
- gst_query_set_latency (fold->query, TRUE, fold->min, fold->max);
+ gst_query_set_latency (fold->query, fold->live, fold->min, fold->max);
GST_DEBUG_OBJECT (bin,
- "latency min %" GST_TIME_FORMAT ", max %" GST_TIME_FORMAT,
- GST_TIME_ARGS (fold->min), GST_TIME_ARGS (fold->max));
+ "latency min %" GST_TIME_FORMAT ", max %" GST_TIME_FORMAT
+ ", live %d", GST_TIME_ARGS (fold->min), GST_TIME_ARGS (fold->max),
+ fold->live);
}