diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-06-12 10:24:43 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-06-17 10:51:30 +0300 |
commit | 61eccaae567e9db0de6bb529c4eda93942a3bafc (patch) | |
tree | dbfa8e0d1879ff7362889cd68481b77e40d45bd3 | |
parent | 1c2ae744bf290846e5c052618f92fd62ce226561 (diff) | |
download | gstreamer-plugins-base-61eccaae567e9db0de6bb529c4eda93942a3bafc.tar.gz |
urisourcebin: Use downloadbuffer element
And only set low-percent/high-percent if not using downloadbuffer, just
like in old uridecodebin. using the watermark based buffering causes
playback to hang never finish buffering with downloadbuffer.
-rw-r--r-- | gst/playback/gsturisourcebin.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gst/playback/gsturisourcebin.c b/gst/playback/gsturisourcebin.c index d0563c65a..03da4a986 100644 --- a/gst/playback/gsturisourcebin.c +++ b/gst/playback/gsturisourcebin.c @@ -1194,11 +1194,9 @@ get_output_slot (GstURISourceBin * urisrc, gboolean do_download, } /* Otherwise create the new slot */ -#if 0 /* There's no downloadbuffer in 1.2 */ if (do_download) elem_name = "downloadbuffer"; else -#endif elem_name = "queue2"; queue = gst_element_factory_make (elem_name, NULL); @@ -1246,6 +1244,11 @@ get_output_slot (GstURISourceBin * urisrc, gboolean do_download, urisrc->ring_buffer_max_size, NULL); /* Disable max-size-buffers - queue based on data rate to the default time limit */ g_object_set (queue, "max-size-buffers", 0, NULL); + + /* Don't start buffering until the queue is empty (< 1%). + * 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); } /* If buffer size or duration are set, set them on the element */ @@ -1262,11 +1265,6 @@ get_output_slot (GstURISourceBin * urisrc, gboolean do_download, } #endif - /* Don't start buffering until the queue is empty (< 1%). - * 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); - /* save queue pointer so we can remove it later */ urisrc->out_slots = g_slist_prepend (urisrc->out_slots, slot); |