From aa30e8d373bb339652ddda83378037f53c7f697c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 3 Apr 2019 18:52:50 +0200 Subject: [PATCH] urisourcebin: don't set watermarks when download downloadbuffer element doesn't handle the properties low-watermark and high-watermark, those are handled by queue2. Currently hi and low watermarks are set regardless queue2 or downloadbuffer are used. Thus, when the later is set, a warning is raised. This patch sets the watermark properties first, if no download. --- gst/playback/gsturisourcebin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/playback/gsturisourcebin.c b/gst/playback/gsturisourcebin.c index 0e0bf82..a06e631 100644 --- a/gst/playback/gsturisourcebin.c +++ b/gst/playback/gsturisourcebin.c @@ -1132,13 +1132,14 @@ get_output_slot (GstURISourceBin * urisrc, gboolean do_download, * Start playback when the queue is 60% full, leaving a bit more room * for upstream to push more without getting bursty */ g_object_set (queue, "low-percent", 1, "high-percent", 60, NULL); + + g_object_set (queue, "low-watermark", urisrc->low_watermark, + "high-watermark", urisrc->high_watermark, NULL); } /* set the necessary limits on the queue-like elements */ g_object_set (queue, "max-size-bytes", GET_BUFFER_SIZE (urisrc), - "max-size-time", (guint64) GET_BUFFER_DURATION (urisrc), - "low-watermark", urisrc->low_watermark, "high-watermark", - urisrc->high_watermark, NULL); + "max-size-time", (guint64) GET_BUFFER_DURATION (urisrc), NULL); #if 0 /* Disabled because this makes initial startup slower for radio streams */ else { -- 2.7.4