summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorJulian <MyFakeAcc.4@googlemail.com>2015-07-13 13:32:30 +0200
committerwm4 <wm4@nowhere>2017-10-09 20:40:31 +0200
commit89c854dc0952fbcb7cf810b8699710257d3a193d (patch)
tree0ea8c55eeecc90bb36628c81e539bd80e5766725 /player/lua
parent3dbd031da06d995c325b2ab0fe7204456f509db0 (diff)
downloadmpv-89c854dc0952fbcb7cf810b8699710257d3a193d.tar.bz2
mpv-89c854dc0952fbcb7cf810b8699710257d3a193d.tar.xz
stats: minor simplification
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/stats.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index 0003d046b2..b463e69cf9 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -111,7 +111,10 @@ function add_video(s)
end
if append_property(s, sec, "fps", {prefix="FPS:", suffix=" (specified)"}) then
append_property(s, sec, "estimated-vf-fps",
- {suffix=" (estimated)", nl="", indent=o.kv_sep, prefix_sep=""})
+ {suffix=" (estimated)", nl="", indent=""})
+ else
+ append_property(s, sec, "estimated-vf-fps",
+ {prefix="FPS:", suffix=" (estimated)"})
end
if append_property(s, sec, "video-params/w", {prefix="Native Resolution:"}) then
append_property(s, sec, "video-params/h",
@@ -159,7 +162,8 @@ end
-- Format and append a property.
--- A property whose value is either `nil` or empty is skipped and not appended.
+-- A property whose value is either `nil` or empty (hereafter called "invalid")
+-- is skipped and not appended.
-- Returns `false` in case nothing was appended, otherwise `true`.
--
-- s : Table containing key `sec`.
@@ -168,8 +172,8 @@ end
-- attr : Optional table to overwrite certain (formatting) attributes for
-- this property.
-- exclude : Optional table containing keys which are considered invalid values
--- for this property, therefore skipping it. This will replace empty
--- string as default invalid value (nil is always invalid).
+-- for this property. Specifying this will replace empty string as
+-- default invalid value (nil is always invalid).
function append_property(s, sec, prop, attr, excluded)
excluded = excluded or {[""] = true}
local ret = mp.get_property_osd(prop)