1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-30 23:38:10 +00:00
mpv/player
Avi Halachmi (:avih) 2335ee5514 stats.lua: page 4 (keys): support help-like terminal printout
While --input-test is useful, and so is page 4 of stats, until now
there was no way to simply print the list in a help-like fashion.

This commit adds such printout, invoked by the script opt
stats-bindlist=yes, which uses the existing page 4 code. This prints
the list on startup and quits immediately - like any help page.

It's awkward to invoke compared to other help pages, and it does
require the stats page to be enabled (it is by default), however
it is a script-generated output, and currently there's no other
method to print a help page generated by a script.

The printout itself is performed using lua's io.write. While reliable,
it's not the standard way for mpv to print to the terminal.

Other possible printout methods are mp.msg.info - which also prints
"[stats]" prefix on each line (ugly), or forcing term-osd and setting
an osd-message which mpv will then print at the terminal - however
that's printed to stderr, and could also be subject to timing concerns
since we quit right afterwards.

In the future we can consider changing/integrating the invocation so
that mpv itself could print a help page generated by a script, thus
solving both the awkward invocation and printout-method issues.
2021-07-19 22:06:50 +03:00
..
javascript js: idle-observers: minor performance improvement 2021-06-22 18:17:11 +03:00
lua stats.lua: page 4 (keys): support help-like terminal printout 2021-07-19 22:06:50 +03:00
audio.c audio: check ao driver init failure to avoid use after free 2021-07-13 15:16:59 +00:00
client.c client API: inactivate the opengl_cb API 2020-09-03 14:52:11 +02:00
client.h scripting: remove race condition when toggling internal scripts 2020-03-26 23:59:44 +01:00
command.c command: adds support for secondary subs to sub-seek and sub-step 2021-07-12 21:07:37 +00:00
command.h command: add internal INPUT_PROCESSED event 2020-11-16 20:29:58 +02:00
configfiles.c player: fix property name 2021-06-24 12:01:22 +03:00
core.h player/{core,loadfile}: make cover art loading more explicit 2021-03-09 23:26:26 +02:00
external_files.c player: change cover-art-auto behavior 2021-06-23 16:23:50 +00:00
external_files.h player: add automatic loading of external cover art files 2020-09-28 00:12:52 +02:00
javascript.c js: add mp.utils.append_file 2021-06-13 22:53:37 +03:00
loadfile.c recorder: add support for attachments (fonts) 2021-07-08 12:44:06 +03:00
lua.c scripting (lua/js): utils.getpid: make wrapper of pid property 2021-05-01 16:07:05 +03:00
main.c demux: Move demuxer help to new standard mechanism 2021-03-28 19:46:32 +03:00
misc.c audio: refactor how data is passed to AO 2020-08-29 13:12:32 +02:00
osd.c player: add --term-title option 2020-05-25 20:39:37 +02:00
playloop.c player: fix missed pause state update during reset in some cases 2021-07-18 12:22:55 +02:00
screenshot.c screenshot: add --screenshot-sw option 2020-10-05 00:16:46 +02:00
screenshot.h player: make screenshot each-frame mode more accurate 2020-02-07 13:32:21 +01:00
scripting.c player/scripting: fix use-after-free when loading script folders 2021-04-08 23:47:35 +03:00
sub.c sub: fix subs/lyrics on music files with sub-past-video-end=no 2021-06-27 21:02:39 -04:00
video.c player: let frontend decide whether to use cover-art mode 2020-09-28 00:04:21 +02:00