summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-05 21:04:17 +0200
committerwm4 <wm4@nowhere>2016-09-05 21:04:17 +0200
commit4ab860cddc177047663bbe8940b0d34c621b6425 (patch)
treeb13ac6888948d4b5f132d03f3ac243ea7790db73 /options/options.c
parentcc813647d54843e4731cc36160f0c1e04e4b1404 (diff)
downloadmpv-4ab860cddc177047663bbe8940b0d34c621b6425.tar.bz2
mpv-4ab860cddc177047663bbe8940b0d34c621b6425.tar.xz
options: add a mechanism to make sub-option replacement slightly easier
Instead of requiring each VO or AO to manually add members to MPOpts and the global option table, make it possible to register them automatically via vo_driver/ao_driver.global_opts members. This avoids modifying options.c/options.h every time, including having to duplicate the exact ifdeffery used to enable a driver.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/options/options.c b/options/options.c
index e00c46c676..e5de82d8a3 100644
--- a/options/options.c
+++ b/options/options.c
@@ -74,7 +74,6 @@ extern const struct m_sub_options input_config;
extern const struct m_sub_options encode_config;
extern const struct m_sub_options image_writer_conf;
extern const struct m_sub_options gl_video_conf;
-extern const struct m_sub_options vo_opengl_conf;
extern const struct m_sub_options ao_alsa_conf;
extern const struct m_obj_list vf_obj_list;
@@ -473,7 +472,8 @@ const m_option_t mp_opts[] = {
//---------------------- 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-defaults", ao_defs, 0, &ao_obj_list,
+ .deprecation_message = "deprecated, use global options"),
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),
@@ -648,10 +648,6 @@ const m_option_t mp_opts[] = {
#if HAVE_GL
OPT_SUBSTRUCT("", gl_video_opts, gl_video_conf, 0),
- OPT_SUBSTRUCT("", vo_opengl_opts, vo_opengl_conf, 0),
-#endif
-#if HAVE_ALSA
- OPT_SUBSTRUCT("", ao_alsa_opts, ao_alsa_conf, 0),
#endif
#if HAVE_ENCODING