mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
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.
This commit is contained in:
parent
25e0b77bbe
commit
66929f8970
1 changed files with 5 additions and 7 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue