1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00
mpv/input
wm4 b440f6dfb3 command: add infrastructure for async commands
This enables two types of command behavior:

1. Plain async behavior, like "loadfile" not completing until the file
   is fully loaded.
2. Running parts of the command on worker threads, e.g. for I/O, such as
   "sub-add" doing network accesses on a thread while the core
   continues.

Both have no implementation yet, and most new code is actually inactive.
The plan is to implement a number of useful cases in the following
commits.

The most tricky part is handling internal keybindings (input.conf) and
the multi-command feature (concatenating commands with ";"). It requires
a bunch of roundabout code to make it do the expected thing in
combination with async commands.

There is the question how commands should be handled that come in at a
higher rate than what can be handled by the core. Currently, it will
simply queue up input.conf commands as long as memory lasts. The client
API is limited by the size of the reply queue per client. For commands
which require a worker thread, the thread pool is limited to 30 threads,
and then will queue up work in memory. The number is completely
arbitrary.
2018-05-24 19:56:34 +02:00
..
cmd.c command: add infrastructure for async commands 2018-05-24 19:56:34 +02:00
cmd.h command: add infrastructure for async commands 2018-05-24 19:56:34 +02:00
event.c Use - as command-name separator everywhere 2016-07-14 22:37:42 +02:00
event.h input/event.h: add include guard 2016-03-15 22:44:15 +01:00
input.c input: rename weirdly named function 2018-05-03 01:20:01 +03:00
input.h input: move an enum back to its correct place 2018-05-24 19:56:33 +02:00
ipc-dummy.c build: change how some OS specific source files are selected 2017-06-29 10:30:16 +02:00
ipc-unix.c all: replace mpv_detach_destroy() with mpv_destroy() 2018-03-15 00:00:04 -07:00
ipc-win.c all: replace mpv_detach_destroy() with mpv_destroy() 2018-03-15 00:00:04 -07:00
ipc.c ipc: raise json nesting limit 2017-05-03 20:47:11 +02:00
keycodes.c input: merge mouse wheel and axis keycodes 2017-09-03 20:31:44 +10:00
keycodes.h input: fix error in MP_KEY_IS_WHEEL 2017-09-03 20:46:06 +10:00
pipe-win32.c osdep: rename atomics.h to atomic.h 2016-09-07 11:26:25 +02:00