summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-02 16:10:55 +0200
committerwm4 <wm4@nowhere>2016-09-02 21:21:47 +0200
commitb2c84a91b69e58df10d6ea966078a03b096712bd (patch)
tree9d03527538f2b1ef017d5aeffd4ed0656e5c20bb /options
parent849480d0c9d5ef76bd3296034b2ad5019fb9c21d (diff)
downloadmpv-b2c84a91b69e58df10d6ea966078a03b096712bd.tar.bz2
mpv-b2c84a91b69e58df10d6ea966078a03b096712bd.tar.xz
options: deprecate --vo-defaults
With the conversion from sub-options to global options, this becomes useless. This change also comes slightly too soon, because not all VOs have been changed yet.
Diffstat (limited to 'options')
-rw-r--r--options/m_option.h5
-rw-r--r--options/options.c17
2 files changed, 12 insertions, 10 deletions
diff --git a/options/m_option.h b/options/m_option.h
index d1426467e7..d344a79db2 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -608,10 +608,11 @@ extern const char m_option_path_separator;
#define OPT_STRING(...) \
OPT_GENERAL(char*, __VA_ARGS__, .type = &m_option_type_string)
-#define OPT_SETTINGSLIST(optname, varname, flags, objlist) \
+#define OPT_SETTINGSLIST(optname, varname, flags, objlist, ...) \
OPT_GENERAL(m_obj_settings_t*, optname, varname, flags, \
.type = &m_option_type_obj_settings_list, \
- .priv = (void*)MP_EXPECT_TYPE(const struct m_obj_list*, objlist))
+ .priv = (void*)MP_EXPECT_TYPE(const struct m_obj_list*, objlist), \
+ __VA_ARGS__)
#define OPT_IMAGEFORMAT(...) \
OPT_GENERAL(int, __VA_ARGS__, .type = &m_option_type_imgfmt)
diff --git a/options/options.c b/options/options.c
index 37e6c9fd61..1d840fd744 100644
--- a/options/options.c
+++ b/options/options.c
@@ -102,8 +102,9 @@ const struct m_opt_choice_alternatives mp_hwdec_names[] = {
#define OPT_BASE_STRUCT struct mp_vo_opts
static const m_option_t mp_vo_opt_list[] = {
- OPT_SETTINGSLIST("vo", video_driver_list, 0, &vo_obj_list),
- OPT_SETTINGSLIST("vo-defaults", vo_defs, 0, &vo_obj_list),
+ OPT_SETTINGSLIST("vo", video_driver_list, 0, &vo_obj_list, ),
+ OPT_SETTINGSLIST("vo-defaults", vo_defs, 0, &vo_obj_list,
+ .deprecation_message = "deprecated, use global options"),
OPT_CHOICE_C("hwdec-preload", hwdec_preload_api, 0, mp_hwdec_names),
OPT_SUBSTRUCT("sws", sws_opts, sws_conf, 0),
OPT_FLAG("taskbar-progress", taskbar_progress, 0),
@@ -375,10 +376,10 @@ const m_option_t mp_opts[] = {
// ------------------------- codec/vfilter options --------------------
- OPT_SETTINGSLIST("af-defaults", af_defs, 0, &af_obj_list),
- OPT_SETTINGSLIST("af*", af_settings, 0, &af_obj_list),
- OPT_SETTINGSLIST("vf-defaults", vf_defs, 0, &vf_obj_list),
- OPT_SETTINGSLIST("vf*", vf_settings, 0, &vf_obj_list),
+ OPT_SETTINGSLIST("af-defaults", af_defs, 0, &af_obj_list, ),
+ OPT_SETTINGSLIST("af*", af_settings, 0, &af_obj_list, ),
+ OPT_SETTINGSLIST("vf-defaults", vf_defs, 0, &vf_obj_list, ),
+ OPT_SETTINGSLIST("vf*", vf_settings, 0, &vf_obj_list, ),
OPT_CHOICE("deinterlace", deinterlace, 0,
({"auto", -1},
@@ -469,8 +470,8 @@ const m_option_t mp_opts[] = {
OPT_FLAG("sub-clear-on-seek", sub_clear_on_seek, 0),
//---------------------- libao/libvo options ------------------------
- OPT_SETTINGSLIST("ao", audio_driver_list, 0, &ao_obj_list),
- OPT_SETTINGSLIST("ao-defaults", ao_defs, 0, &ao_obj_list),
+ OPT_SETTINGSLIST("ao", audio_driver_list, 0, &ao_obj_list, ),
+ OPT_SETTINGSLIST("ao-defaults", ao_defs, 0, &ao_obj_list, ),
OPT_STRING("audio-device", audio_device, 0),
OPT_STRING("audio-client-name", audio_client_name, 0),
OPT_FLAG("audio-fallback-to-null", ao_null_fallback, 0),