stats.lua: add codec profile

May be interesting information for users.

Fixes: #13839
This commit is contained in:
Kacper Michajłow 2024-04-11 20:46:19 +02:00
parent 0bcc33692d
commit ab504514b8
1 changed files with 10 additions and 2 deletions

View File

@ -892,7 +892,10 @@ local function add_video(s)
end
append(s, "", {prefix=o.nl .. o.nl .. "Video:", nl="", indent=""})
if append_property(s, "video-codec", {prefix_sep="", nl="", indent=""}) then
local ci = mp.get_property_native("video-codec-info")
if ci and append(s, ci["desc"], {prefix_sep="", nl="", indent=""}) then
append(s, ci["profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
append_property(s, "hwdec-current", {prefix="HW:", nl="",
indent=o.prefix_sep .. o.prefix_sep,
no_prefix_markup=false, suffix=""}, {no=true, [""]=true})
@ -945,7 +948,12 @@ local function add_audio(s)
end
append(s, "", {prefix=o.nl .. o.nl .. "Audio:", nl="", indent=""})
append_property(s, "audio-codec", {prefix_sep="", nl="", indent=""})
local ci = mp.get_property_native("audio-codec-info")
if ci then
append(s, ci["desc"], {prefix_sep="", nl="", indent=""})
append(s, ci["profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
end
append_property(s, "current-ao", {prefix="AO:", nl="",
indent=o.prefix_sep .. o.prefix_sep})
local dev = append_property(s, "audio-device", {prefix="Device:"})