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

plugins/elements/gstqueue.c: Queue can latency to the pipeline up to the...

plugins/elements/gstqueue.c: Queue can latency to the pipeline up to the configured max size in time.

Original commit message from CVS:
* plugins/elements/gstqueue.c: (gst_queue_handle_src_query):
Queue can latency to the pipeline up to the configured max size in time.
Report this fact in the latency query.
parent e332c349
2007-09-13 Wim Taymans <wim.taymans@gmail.com>
* plugins/elements/gstqueue.c: (gst_queue_handle_src_query):
Queue can latency to the pipeline up to the configured max size in time.
Report this fact in the latency query.
2007-09-13 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Sebastien Moutte <sebastien at moutte dot net>
......
......@@ -1068,6 +1068,25 @@ gst_queue_handle_src_query (GstPad * pad, GstQuery * query)
gst_query_set_position (query, format, peer_pos);
break;
}
case GST_QUERY_LATENCY:
{
gboolean live;
GstClockTime min, max;
gst_query_parse_latency (query, &live, &min, &max);
/* we can delay up to the limit of the queue in time. If we have no time
* limit, the best thing we can do is to return an infinite delay. In
* reality a better estimate would be the byte/buffer rate but that is not
* possible right now. */
if (queue->max_size.time > 0 && max != -1)
max += queue->max_size.time;
else
max = -1;
gst_query_set_latency (query, live, min, max);
break;
}
default:
/* peer handled other queries */
break;
......
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