urisourcebin: Shrink queue2 max-size-time buffering
authorJan Schmidt <jan@centricular.com>
Wed, 8 Mar 2017 14:40:06 +0000 (01:40 +1100)
committerJan Schmidt <jan@centricular.com>
Wed, 8 Mar 2017 14:42:14 +0000 (01:42 +1100)
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

index 6d80daa..6bd6e10 100644 (file)
@@ -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