urisourcebin: don't set watermarks when download
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 3 Apr 2019 16:52:50 +0000 (18:52 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Mon, 8 Apr 2019 11:16:22 +0000 (11:16 +0000)
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

index 0e0bf8291904b240d6e0bdd135988bfdbe604239..a06e631e98ec71f79cb1612afdacafd8c4567ed2 100644 (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
      * 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 {