mpv_command_node

Same as mpv_command(), but allows passing structured data in any format. In particular, calling mpv_command() is exactly like calling mpv_command_node() with the format set to MPV_FORMAT_NODE_ARRAY, and every arg passed in order as MPV_FORMAT_STRING.

Does not use OSD and string expansion by default.

The args argument can have one of the following formats:

More...
extern (C)
int
mpv_command_node

Detailed Description

MPV FORMAT NODE ARRAY

Positional arguments. Each entry is an argument using an arbitrary format (the format must be compatible to the used command). Usually, the first item is the command name (as MPV_FORMAT_STRING). The order of arguments is as documented in each command description.

MPV FORMAT NODE MAP

Named arguments. This requires at least an entry with the key "name" to be present, which must be a string, and contains the command name. 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. Some commands do not support named arguments at all, and must use MPV_FORMAT_NODE_ARRAY.

@paramin args mpv_node with format set to one of the values documented above (see there for details) @paramout result Optional, pass NULL if unused. If not NULL, and if the function succeeds, this is set to command-specific return data. You must call mpv_free_node_contents() to free it (again, only if the command actually succeeds). Not many commands actually use this at all. @return error code (the result parameter is not set on error)

Meta