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.
This commit is contained in:
Víctor Manuel Jáquez Leal 2019-04-03 18:52:50 +02:00
parent c701d17f12
commit aa30e8d373

View file

@ -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 * Start playback when the queue is 60% full, leaving a bit more room
* for upstream to push more without getting bursty */ * for upstream to push more without getting bursty */
g_object_set (queue, "low-percent", 1, "high-percent", 60, NULL); 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 */ /* set the necessary limits on the queue-like elements */
g_object_set (queue, "max-size-bytes", GET_BUFFER_SIZE (urisrc), g_object_set (queue, "max-size-bytes", GET_BUFFER_SIZE (urisrc),
"max-size-time", (guint64) GET_BUFFER_DURATION (urisrc), "max-size-time", (guint64) GET_BUFFER_DURATION (urisrc), NULL);
"low-watermark", urisrc->low_watermark, "high-watermark",
urisrc->high_watermark, NULL);
#if 0 #if 0
/* Disabled because this makes initial startup slower for radio streams */ /* Disabled because this makes initial startup slower for radio streams */
else { else {