1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 01:22:30 +00:00
mpv/input
wm4 218d6643e9 client API, lua, ipc: unify event struct return
Both Lua and the JSON IPC code need to convert the mpv_event struct (and
everything it points to) to Lua tables or JSON.

I was getting sick of having to make the same changes to Lua and IPC. Do
what has been done everywhere else, and let the core handle this by
going through mpv_node (which is supposed to serve both Lua tables and
JSON, and potentially other scripting language backends). Expose it as
new libmpv API function.

The new API is still a bit "rough" and support for other event types
might be added in the future.

This silently adds support for the playlist_entry_id fields to both Lua
and JSON IPC.

There is a small API change for Lua; I don't think this matters, so I
didn't care about compatibility. The new code in client.c is mashed up
from the Lua and the IPC code. The manpage additions are moved from the
Lua docs, and made slightly more "general".

Some danger for unintended regressions both in Lua and IPC. Also damn
these node functions suck, expect crashes due to UB.

Not sure why this became more code instead of less compared to before
(according to the diff stat), even though some code duplication across
Lua and IPC was removed. Software development sucks.
2020-03-21 19:33:48 +01:00
..
cmd.c input: log commands with parameter names 2020-02-19 16:25:18 +01:00
cmd.h options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
event.c input: ignore empty lines on drag-drop mime data 2019-09-21 15:39:47 +02:00
event.h
input.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
input.h scripting: add a way to run sub processes as "scripts" 2020-02-19 22:18:15 +01:00
ipc-dummy.c scripting: add a way to run sub processes as "scripts" 2020-02-19 22:18:15 +01:00
ipc-unix.c scripting: add a way to run sub processes as "scripts" 2020-02-19 22:18:15 +01:00
ipc-win.c scripting: add a way to run sub processes as "scripts" 2020-02-19 22:18:15 +01:00
ipc.c client API, lua, ipc: unify event struct return 2020-03-21 19:33:48 +01:00
keycodes.c input: add new PLAYONLY and PAUSEONLY MP_KEY key codes 2020-01-26 12:09:55 +01:00
keycodes.h input: add new PLAYONLY and PAUSEONLY MP_KEY key codes 2020-01-26 12:09:55 +01:00
pipe-win32.c osdep: rename atomics.h to atomic.h 2016-09-07 11:26:25 +02:00
sdl_gamepad.c sdl: prevent concurrent use of SDL in different threads 2019-10-25 22:17:54 +02:00