From b8193e40719a2a72d9b25e8ea3070c0e84beb48e Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 15 Jun 2017 15:22:06 +0200 Subject: command: add all options to property->option bridge Before this, options with co->data==NULL (i.e. no storage) were not added to the bridge (except alias options). There are a few options which might make sense to allow via the bridge ("profile" and "include"). So allow them. In command_init(), we merely remove the co->data check, the rest of the diff is due to switching the if/else branches for convenience. We also must explicitly error on M_PROPERTY_GET if co->data==NULL. All other cases check it in some way. Explicitly exclude options from the property bridge, which would be added due this, and the result would be pointless. --- DOCS/man/input.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 6759226c6e..ed3dc2311f 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2210,6 +2210,14 @@ caveats with some properties (due to historical reasons): These properties behave different from the deprecated options with the same names. +``profile``, ``include`` + These are write-only, and will perform actions as they are written to, + exactly as if they were used on the mpv CLI commandline. Their only use is + when using libmpv before ``mpv_initialize()``, which in turn is probably + only useful in encoding mode. Normal libmpv users should use other + mechanisms, such as the ``apply-profile`` command, and the + ``mpv_load_config_file`` API function. Avoid these properties. + Property Expansion ------------------ -- cgit v1.2.3