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.
This commit is contained in:
Wim Taymans 2007-09-13 17:15:38 +00:00
parent e332c34902
commit d17d899f14
2 changed files with 25 additions and 0 deletions

View file

@ -1,3 +1,9 @@
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>

View file

@ -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;