diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index d56abfdfba..f85211a1f6 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -84,6 +84,7 @@ Interface changes - remove deprecated `--oaoffset`, `--oafirst`, `--ovoffset`, `--ovfirst`, `--demuxer-force-retry-on-eof`, `--fit-border` options - remove deprecated `--record-file` option + - remove deprecated `--vf-defaults` and `--af-defaults` options --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/af.rst b/DOCS/man/af.rst index 29f6b0128a..8bef9a991f 100644 --- a/DOCS/man/af.rst +++ b/DOCS/man/af.rst @@ -19,8 +19,8 @@ syntax is: The ``--vf`` description describes how libavfilter can be used and how to workaround deprecated mpv filters. -See ``--vf`` group of options for info on how ``--af-defaults``, ``--af-add``, -``--af-pre``, ``--af-del``, ``--af-clr``, and possibly others work. +See ``--vf`` group of options for info on how ``--af-add``, ``--af-pre``, +``--af-del``, ``--af-clr``, and possibly others work. Available filters are: diff --git a/DOCS/man/vf.rst b/DOCS/man/vf.rst index d42acdc44b..da531eaae0 100644 --- a/DOCS/man/vf.rst +++ b/DOCS/man/vf.rst @@ -55,14 +55,6 @@ above in combination with the ``vf`` command (see `COMMAND INTERFACE`_) to get more control over this. Initially disabled filters with ``!`` are useful for this as well. -You can also set defaults for each filter. The defaults are applied before the -normal filter parameters. This is deprecated and never worked for the -libavfilter bridge. - -``--vf-defaults=`` - Set defaults for each filter. (Deprecated. ``--af-defaults`` is deprecated - as well.) - .. note:: To get a full list of available video filters, see ``--vf=help`` and diff --git a/filters/user_filters.c b/filters/user_filters.c index cf1764e9c9..c87953551c 100644 --- a/filters/user_filters.c +++ b/filters/user_filters.c @@ -134,16 +134,13 @@ struct mp_filter *mp_create_user_filter(struct mp_filter *parent, const char *name, char **args) { const struct m_obj_list *obj_list = NULL; - const char *defs_name = NULL; enum mp_frame_type frame_type = 0; if (type == MP_OUTPUT_CHAIN_VIDEO) { frame_type = MP_FRAME_VIDEO; obj_list = &vf_obj_list; - defs_name = "vf-defaults"; } else if (type == MP_OUTPUT_CHAIN_AUDIO) { frame_type = MP_FRAME_AUDIO; obj_list = &af_obj_list; - defs_name = "af-defaults"; } assert(frame_type && obj_list); @@ -163,18 +160,9 @@ struct mp_filter *mp_create_user_filter(struct mp_filter *parent, void *options = NULL; if (desc.options) { - struct m_obj_settings *defs = NULL; - if (defs_name) { - mp_read_option_raw(parent->global, defs_name, - &m_option_type_obj_settings_list, &defs); - } - struct m_config *config = m_config_from_obj_desc_and_args(NULL, parent->log, parent->global, - &desc, name, defs, args); - - struct m_option dummy = {.type = &m_option_type_obj_settings_list}; - m_option_free(&dummy, &defs); + &desc, args); if (!config) goto done; diff --git a/options/m_config_frontend.c b/options/m_config_frontend.c index 5a6db46d83..8ad12e5d80 100644 --- a/options/m_config_frontend.c +++ b/options/m_config_frontend.c @@ -168,18 +168,9 @@ static int m_config_set_obj_params(struct m_config *config, struct mp_log *log, struct m_config *m_config_from_obj_desc_and_args(void *ta_parent, struct mp_log *log, struct mpv_global *global, struct m_obj_desc *desc, - const char *name, struct m_obj_settings *defaults, char **args) + char **args) { struct m_config *config = m_config_from_obj_desc(ta_parent, log, global, desc); - - for (int n = 0; defaults && defaults[n].name; n++) { - struct m_obj_settings *entry = &defaults[n]; - if (name && strcmp(entry->name, name) == 0) { - if (m_config_set_obj_params(config, log, global, desc, entry->attribs) < 0) - goto error; - } - } - if (m_config_set_obj_params(config, log, global, desc, args) < 0) goto error; diff --git a/options/m_config_frontend.h b/options/m_config_frontend.h index 2812033b75..72a5b81d94 100644 --- a/options/m_config_frontend.h +++ b/options/m_config_frontend.h @@ -115,10 +115,9 @@ struct m_config *m_config_new(void *talloc_ctx, struct mp_log *log, // different sub-options for every filter (represented by separate desc // structs). // args is an array of key/value pairs (args=[k0, v0, k1, v1, ..., NULL]). -// name/defaults is only needed for the legacy af-defaults/vf-defaults options. struct m_config *m_config_from_obj_desc_and_args(void *ta_parent, struct mp_log *log, struct mpv_global *global, struct m_obj_desc *desc, - const char *name, struct m_obj_settings *defaults, char **args); + char **args); // Like m_config_from_obj_desc_and_args(), but don't allocate option the // struct, i.e. m_config.optstruct==NULL. This is used by the sub-option diff --git a/options/options.c b/options/options.c index f080657e00..1fc80ea3d6 100644 --- a/options/options.c +++ b/options/options.c @@ -574,11 +574,7 @@ static const m_option_t mp_opts[] = { // ------------------------- codec/vfilter options -------------------- - {"af-defaults", OPT_SETTINGSLIST(af_defs, &af_obj_list), - .deprecation_message = "use --af + enable/disable flags"}, {"af", OPT_SETTINGSLIST(af_settings, &af_obj_list)}, - {"vf-defaults", OPT_SETTINGSLIST(vf_defs, &vf_obj_list), - .deprecation_message = "use --vf + enable/disable flags"}, {"vf", OPT_SETTINGSLIST(vf_settings, &vf_obj_list)}, {"", OPT_SUBSTRUCT(filter_opts, filter_conf)}, diff --git a/options/options.h b/options/options.h index f820a0cbc0..b7af6efb98 100644 --- a/options/options.h +++ b/options/options.h @@ -299,8 +299,8 @@ typedef struct MPOpts { int force_srate; double playback_speed; bool pitch_correction; - struct m_obj_settings *vf_settings, *vf_defs; - struct m_obj_settings *af_settings, *af_defs; + struct m_obj_settings *vf_settings; + struct m_obj_settings *af_settings; struct filter_opts *filter_opts; struct dec_wrapper_opts *dec_wrapper; char **sub_name;