Obviously, this has no effect on commands which do not support this explicitly. A later commit will enable this for screenshots. Also add some wording on mpv_command_async(), which has nothing to do with this. Having a more elegant, unified behavior would be nice. But the API function was not created for this - it's merely for running commands _synchronously_ on the core, but without blocking the client API caller (if the API user consistently uses only async functions).
Showing the changes to input (2 of 4 files). Show all
Unified · Split
| @@ -49,6 +49,7 @@ static const struct flag cmd_flags[] = { · 48 unmodified lines | ||
| 49 | 49 | {"expand-properties", 0, MP_EXPAND_PROPERTIES}, |
| 50 | 50 | {"raw", MP_EXPAND_PROPERTIES, 0}, |
| 51 | 51 | {"repeatable", 0, MP_ALLOW_REPEAT}, |
| 52 | + {"async", 0, MP_ASYNC_CMD}, | |
| 52 | 53 | {0} |
| 53 | 54 | }; |
| 54 | 55 | |
| @@ -34,6 +34,7 @@ enum mp_cmd_flags { · 33 unmodified lines | ||
| 34 | 34 | MP_ON_OSD_MSG = 4, // force a message, if applicable |
| 35 | 35 | MP_EXPAND_PROPERTIES = 8, // expand strings as properties |
| 36 | 36 | MP_ALLOW_REPEAT = 16, // if used as keybinding, allow key repeat |
| 37 | + MP_ASYNC_CMD = 32, | |
| 37 | 38 | |
| 38 | 39 | MP_ON_OSD_FLAGS = MP_ON_OSD_NO | MP_ON_OSD_AUTO | |
| 39 | 40 | MP_ON_OSD_BAR | MP_ON_OSD_MSG, |