History

input: add "async" flag

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).

wm4 committed 9 years ago

Commit a071d5f1 parent ec3dd714 files · +12 −0Browse files

Showing the changes to input (2 of 4 files). Show all

Unified · Split

2 files
  1. input/cmd_parse.c +1 −0
  2. input/input.h +1 −0
input/cmd_parse.c+1−0
@@ -49,6 +49,7 @@ static const struct flag cmd_flags[] = { · 48 unmodified lines
49 {"expand-properties", 0, MP_EXPAND_PROPERTIES},49 {"expand-properties", 0, MP_EXPAND_PROPERTIES},
50 {"raw", MP_EXPAND_PROPERTIES, 0},50 {"raw", MP_EXPAND_PROPERTIES, 0},
51 {"repeatable", 0, MP_ALLOW_REPEAT},51 {"repeatable", 0, MP_ALLOW_REPEAT},
52 {"async", 0, MP_ASYNC_CMD},
52 {0}53 {0}
53};54};
54 55
input/input.h+1−0
@@ -34,6 +34,7 @@ enum mp_cmd_flags { · 33 unmodified lines
34 MP_ON_OSD_MSG = 4, // force a message, if applicable34 MP_ON_OSD_MSG = 4, // force a message, if applicable
35 MP_EXPAND_PROPERTIES = 8, // expand strings as properties35 MP_EXPAND_PROPERTIES = 8, // expand strings as properties
36 MP_ALLOW_REPEAT = 16, // if used as keybinding, allow key repeat36 MP_ALLOW_REPEAT = 16, // if used as keybinding, allow key repeat
37 MP_ASYNC_CMD = 32,
37 38
38 MP_ON_OSD_FLAGS = MP_ON_OSD_NO | MP_ON_OSD_AUTO |39 MP_ON_OSD_FLAGS = MP_ON_OSD_NO | MP_ON_OSD_AUTO |
39 MP_ON_OSD_BAR | MP_ON_OSD_MSG,40 MP_ON_OSD_BAR | MP_ON_OSD_MSG,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t