From 332907e1d7225ae39565d462aac5c45c3a5cad97 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 17 May 2018 20:10:39 +0200 Subject: 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".) --- DOCS/interface-changes.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'DOCS/interface-changes.rst') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 4afe18ae60..49c9bda9ba 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -106,6 +106,9 @@ Interface changes - ipc: require that "request_id" fields are integers. Other types are still accepted for compatibility, but this will stop in the future. Also, if no request_id is provided, 0 will be assumed. + - mpv_command_node() and mp.command_native() now support named arguments + (see manpage). If you want to use them, use a new version of the manpage + as reference, which lists the definitive names. --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs -- cgit v1.2.3