diff options
author | Julian <MyFakeAcc.4@googlemail.com> | 2016-07-19 16:11:51 +0900 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-09 20:40:31 +0200 |
commit | 9d8495a9603a0d5a99467c986fc50ea871960eec (patch) | |
tree | bf6e634e6685db30ce51c0e4f575df4bfe54a52c /player/lua/stats.lua | |
parent | 9b439e945368e4ea6c6666e7038872d5340a05f7 (diff) | |
download | mpv-9d8495a9603a0d5a99467c986fc50ea871960eec.tar.bz2 mpv-9d8495a9603a0d5a99467c986fc50ea871960eec.tar.xz |
stats: save ASS sequences locally
Instead of querying them constantly.
Also add a tiny bit of documentation to some variables.
Diffstat (limited to 'player/lua/stats.lua')
-rw-r--r-- | player/lua/stats.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 1cc526b992..001de404f1 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -65,19 +65,26 @@ local o = { options.read_options(o) local format = string.format +-- Buffer for the "last" value of performance data for render/present/upload local plast = {{0}, {0}, {0}} +-- Position in buffer local ppos = 1 +-- Length of buffer local plen = 50 +-- Function used to record performance data local recorder = nil -local timer - +-- Timer used for toggling +local timer = nil +-- Save these sequences locally as we'll need them a lot +local ass_start = mp.get_property_osd("osd-ass-cc/0") +local ass_stop = mp.get_property_osd("osd-ass-cc/1") local function set_ASS(b) if not o.ass_formatting then return "" end - return mp.get_property_osd("osd-ass-cc/" .. (b and "0" or "1")) + return b and ass_start or ass_stop end |