From 4e911760d271fcd1552f34a4aaa1e7a966512fb7 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 9 Mar 2017 01:40:06 +1100 Subject: [PATCH] urisourcebin: Shrink queue2 max-size-time buffering The expanded 4 second buffering was making radio streams that are being delivered at real-time speeds too slow. We might need a better plan for matching the queue2 size to incoming bitrate in the absence of tag information or timestamping. In uridecodebin, it used tags on the output of decodebin to adjust the queue2 buffering, but urisourcebin doesn't have that view - decodebin is downstream from us. --- gst/playback/gsturisourcebin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/playback/gsturisourcebin.c b/gst/playback/gsturisourcebin.c index 6d80daa..6bd6e10 100644 --- a/gst/playback/gsturisourcebin.c +++ b/gst/playback/gsturisourcebin.c @@ -1218,11 +1218,14 @@ get_output_slot (GstURISourceBin * urisrc, gboolean do_download, g_object_set (queue, "max-size-bytes", urisrc->buffer_size, NULL); if (urisrc->buffer_duration != -1) g_object_set (queue, "max-size-time", urisrc->buffer_duration, NULL); +#if 0 + /* Disabled because this makes initial startup slower for radio streams */ else { /* Buffer 4 seconds by default - some extra headroom over the * core default, because we trigger playback sooner */ - g_object_set (queue, "max-size-time", 4 * GST_SECOND, NULL); + //g_object_set (queue, "max-size-time", 4 * GST_SECOND, NULL); } +#endif /* Don't start buffering until the queue is empty (< 1%). * Start playback when the queue is 60% full, leaving a bit more room -- 2.7.4