summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-26 19:55:40 +0200
committerwm4 <wm4@nowhere>2017-06-26 20:07:20 +0200
commit6f80a694d3de98ce9ddabf1c188865fc6be69710 (patch)
treed6f1f5faf4da5a20701c06f7a25cccbf9fc1d12b
parent4c17ed457d3e7ee31bbeefa2d99ae6da75d2b21f (diff)
downloadmpv-6f80a694d3de98ce9ddabf1c188865fc6be69710.tar.bz2
mpv-6f80a694d3de98ce9ddabf1c188865fc6be69710.tar.xz
client API: drop old "no-" option emulation
You could do mpv_set_option(h, "no-fs", ""), which would behave like "--no-fs" on the command line. At one point, this had to be emulated for compatibility, and printed a deprecation warning. This was almost a year ago, so remove it.
-rw-r--r--DOCS/client-api-changes.rst3
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--libmpv/client.h2
-rw-r--r--options/m_config.c24
4 files changed, 7 insertions, 23 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index f2a84a6acb..b94b3bf630 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -32,6 +32,9 @@ API changes
::
+ --- mpv 0.26.0 ---
+ 1.25 - remove setting "no-" options via mpv_set_option*(). (See corresponding
+ deprecation in 0.23.0.)
--- mpv 0.25.0 ---
1.24 - add a MPV_ENABLE_DEPRECATED preprocessor symbol, which can be defined
by the user to exclude deprecated API symbols from the C headers
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 698a5ff785..93894f2404 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -37,6 +37,7 @@ Interface changes
- the "osd" command is deprecated (use "cycle osd-level")
- --field-dominance is deprecated (use --vf=setfield=bff or tff)
- --really-quiet subtle behavior change
+ - the deprecated handling of setting "no-" options via client API is dropped
--- mpv 0.25.0 ---
- remove opengl-cb dxva2 dummy hwdec interop
(see git "vo_opengl: remove dxva2 dummy hwdec backend")
diff --git a/libmpv/client.h b/libmpv/client.h
index 8faa7b8129..eca0978fee 100644
--- a/libmpv/client.h
+++ b/libmpv/client.h
@@ -205,7 +205,7 @@ extern "C" {
* relational operators (<, >, <=, >=).
*/
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
-#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 24)
+#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 25)
/**
* The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before
diff --git a/options/m_config.c b/options/m_config.c
index dabea4647c..27bd5b620e 100644
--- a/options/m_config.c
+++ b/options/m_config.c
@@ -236,9 +236,6 @@ void *m_config_group_from_desc(void *ta_parent, struct mp_log *log,
}
}
-static struct m_config_option *m_config_find_negation_opt(struct m_config *config,
- struct bstr *name);
-
static int m_config_set_obj_params(struct m_config *config, struct mp_log *log,
struct mpv_global *global,
struct m_obj_desc *desc, char **args)
@@ -874,28 +871,11 @@ int m_config_set_option(struct m_config *config, struct bstr name,
int m_config_set_option_node(struct m_config *config, bstr name,
struct mpv_node *data, int flags)
{
- struct mpv_node tmp;
int r;
struct m_config_option *co = m_config_get_co(config, name);
- if (!co) {
- bstr orig_name = name;
- co = m_config_find_negation_opt(config, &name);
- if (!co)
- return M_OPT_UNKNOWN;
- if (!(data->format == MPV_FORMAT_STRING && !bstr0(data->u.string).len) &&
- !(data->format == MPV_FORMAT_FLAG && data->u.flag == 1))
- return M_OPT_INVALID;
- tmp.format = MPV_FORMAT_STRING;
- tmp.u.string = "no";
- data = &tmp;
-
- if (!co->warning_was_printed) {
- MP_WARN(config, "Option '%.*s': setting 'no-' option via API is "
- "deprecated and will stop working.\n", BSTR_P(orig_name));
- co->warning_was_printed = true;
- }
- }
+ if (!co)
+ return M_OPT_UNKNOWN;
// Do this on an "empty" type to make setting the option strictly overwrite
// the old value, as opposed to e.g. appending to lists.