summaryrefslogtreecommitdiffstats
path: root/libmpv
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-17 20:10:39 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:34 +0200
commit332907e1d7225ae39565d462aac5c45c3a5cad97 (patch)
tree5c4ab4f6e8d5bb262b3cb9cdeee724eff7c4a890 /libmpv
parentd36b85cfdf4714a0498aec2a1f548ce0467e4fe3 (diff)
downloadmpv-332907e1d7225ae39565d462aac5c45c3a5cad97.tar.bz2
mpv-332907e1d7225ae39565d462aac5c45c3a5cad97.tar.xz
command: give named arguments to almost all commands
Before this change, only 1 command or so had named arguments. There is no reason why other commands can't have them, except that it's a bit of work to add them. Commands with variable number of arguments are inherently incompatible to named arguments, such as the "run" command. They still have dummy names, but obviously you can't assign multiple values to a single named argument (unless the argument has an array type, which would be something different). For now, disallow using named argument APIs with these commands. This might change later. 2 commands are adjusted to not need a separate default value by changing flag constants. (The numeric values are C only and can't be set by users.) Make the command syntax in the manpage more consistent. Now none of the allowed choice/flag names are in the command header, and all arguments are shown with their proper name and quoted with <...>. Some places in the manpage and the client.h doxygen are updated to reflect that most commands support named arguments. In addition, try to improve the documentation of the syntax and need for escaping etc. as well. (Or actually most uses of the word "argument" should be "parameter".)
Diffstat (limited to 'libmpv')
-rw-r--r--libmpv/client.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpv/client.h b/libmpv/client.h
index 32c2d0a6e1..44c48402a8 100644
--- a/libmpv/client.h
+++ b/libmpv/client.h
@@ -955,8 +955,8 @@ int mpv_command(mpv_handle *ctx, const char **args);
* The special entry "_flags" is optional, and if present, must be an
* array of strings, each being a command prefix to apply. All other
* entries are interpreted as arguments. They must use the argument names
- * as documented in each command description. Currently, most commands do
- * not support named arguments at all.
+ * as documented in each command description. Some commands do not
+ * support named arguments at all, and must use MPV_FORMAT_NODE_ARRAY.
*
* @param[in] args mpv_node with format set to one of the values documented
* above (see there for details)