diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2024-04-16 20:29:17 +0200 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-04-16 21:58:55 +0200 |
commit | d23f641bb3b02ab226ed7228ea6b8d1a0cda2785 (patch) | |
tree | f26b4fa700b348e50992a37653686ad31c308b50 /player/lua | |
parent | 68bcbf66ef4a9bcab1ffd6c5c5cf8fd7fd39bb7e (diff) | |
download | mpv-d23f641bb3b02ab226ed7228ea6b8d1a0cda2785.tar.bz2 mpv-d23f641bb3b02ab226ed7228ea6b8d1a0cda2785.tar.xz |
player/command: remove codec-info and use track-list directly
Turns out that adding more medatata like HDR10+ and Dolby Vision would
produce a lot of duplication and it is better to centralize it around
the track-list property.
Fixes: e720159f72be2a816db849acb286f36a1ac4622b
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/stats.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 549ad1d03f..3d093c7e2e 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -892,9 +892,9 @@ local function add_video(s) end append(s, "", {prefix=o.nl .. o.nl .. "Video:", nl="", indent=""}) - 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="", + local track = mp.get_property_native("current-tracks/video") + 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="]"}) append_property(s, "hwdec-current", {prefix="HW:", nl="", indent=o.prefix_sep .. o.prefix_sep, @@ -948,10 +948,10 @@ local function add_audio(s) end append(s, "", {prefix=o.nl .. o.nl .. "Audio:", 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="", + local track = mp.get_property_native("current-tracks/audio") + if track then + append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""}) + append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="", no_prefix_markup=true, suffix="]"}) end append_property(s, "current-ao", {prefix="AO:", nl="", |