diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2024-04-11 20:46:19 +0200 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-04-15 19:34:40 +0200 |
commit | ab504514b874c66fa83dd17cafd4092220138a2b (patch) | |
tree | e9e3043dd52c8a197c91ae5fa9a5aed901f9b156 /player/lua/stats.lua | |
parent | 0bcc33692d3824535cc9020f033892a202bc4923 (diff) | |
download | mpv-ab504514b874c66fa83dd17cafd4092220138a2b.tar.bz2 mpv-ab504514b874c66fa83dd17cafd4092220138a2b.tar.xz |
stats.lua: add codec profile
May be interesting information for users.
Fixes: #13839
Diffstat (limited to 'player/lua/stats.lua')
-rw-r--r-- | player/lua/stats.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua index d141e7c76a..549ad1d03f 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -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:"}) |