0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

stats: remove duplicate cache sizes

The stream cache no longer exists, so there is no need to show the demuxer cache separately anymore.
This commit is contained in:
sfan5 2018-12-06 19:01:26 +01:00
parent e0419fb181
commit 179ad276f2

View File

@ -447,13 +447,10 @@ local function add_file(s)
demuxer_cache = 0 demuxer_cache = 0
end end
local demuxer_secs = mp.get_property_number("demuxer-cache-duration", 0) local demuxer_secs = mp.get_property_number("demuxer-cache-duration", 0)
local stream_cache = mp.get_property_number("cache-used", 0) * 1024 -- returns KiB if demuxer_cache + demuxer_secs > 0 then
if stream_cache + demuxer_cache + demuxer_secs > 0 then append(s, utils.format_bytes_humanized(demuxer_cache), {prefix="Total Cache:"})
append(s, utils.format_bytes_humanized(stream_cache + demuxer_cache), {prefix="Total Cache:"}) append(s, format("%.1f", demuxer_secs), {prefix="(", suffix=" sec)", nl="",
append(s, utils.format_bytes_humanized(demuxer_cache), {prefix="(Demuxer:", no_prefix_markup=true, prefix_sep="", indent=o.prefix_sep})
suffix=",", nl="", no_prefix_markup=true, indent=o.prefix_sep})
append(s, format("%.1f", demuxer_secs), {suffix=" sec)", nl="", indent="",
no_prefix_markup=true})
local speed = mp.get_property_number("cache-speed", 0) local speed = mp.get_property_number("cache-speed", 0)
if speed > 0 then if speed > 0 then
append(s, utils.format_bytes_humanized(speed) .. "/s", {prefix="Speed:", nl="", append(s, utils.format_bytes_humanized(speed) .. "/s", {prefix="Speed:", nl="",