mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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:
parent
e332c34902
commit
d17d899f14
2 changed files with 25 additions and 0 deletions
|
@ -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>
|
2007-09-13 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
Patch by: Sebastien Moutte <sebastien at moutte dot net>
|
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);
|
gst_query_set_position (query, format, peer_pos);
|
||||||
break;
|
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:
|
default:
|
||||||
/* peer handled other queries */
|
/* peer handled other queries */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue