stats.lua: display short decoder name if not generic one is used

This commit is contained in:
Kacper Michajłow 2024-04-15 21:13:33 +02:00
parent a569c3ce0c
commit dc632e16d2
1 changed files with 8 additions and 0 deletions

View File

@ -921,6 +921,10 @@ local function add_video(s)
if track and append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""}) then
append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
if track["codec"] ~= track["decoder"] then
append(s, track["decoder"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
end
append_property(s, "hwdec-current", {prefix="HW:", nl="",
indent=o.prefix_sep .. o.prefix_sep,
no_prefix_markup=false, suffix=""}, {no=true, [""]=true})
@ -976,6 +980,10 @@ local function add_audio(s)
local track = mp.get_property_native("current-tracks/audio")
if track then
append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""})
if track["codec"] ~= track["decoder"] then
append(s, track["decoder"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
end
append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
end