adaptivedemux2: Improve minimum buffering threshold
authorEdward Hervey <edward@centricular.com>
Fri, 21 Oct 2022 15:24:41 +0000 (17:24 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Mon, 31 Oct 2022 15:16:50 +0000 (16:16 +0100)
commit33db765f454b9eed9c641f12055cb2006299f7a8
tree689648820639406c28f4eae2ad8d9eed9ce4f333
parentd8bdd9429bb7c3c1be4d90aaafbe5ad3753324e5
adaptivedemux2: Improve minimum buffering threshold

Previously the minimum buffering threshold was hardcoded to a specific
value (10s). This is suboptimal this an actual value will depend on the actual
stream being played.

This commit sets the low watermark threshold in time to 0, which is an automatic
mode. Subclasses can provide a stream `recommended_buffering_threshold` when
update_stream_info() is called.

Currently implemented for HLS, where we recommended 1.5 average segment
duration. This will result in buffering being at 100% when the 2nd segment has
been downloaded (minus a bit already being consumed downstream)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3240>
subprojects/gst-plugins-good/docs/gst_plugins_cache.json
subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c
subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c
subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.h
subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c
subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c
subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.h