From 4ab860cddc177047663bbe8940b0d34c621b6425 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 5 Sep 2016 21:04:17 +0200 Subject: 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. --- options/options.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'options/options.c') 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 -- cgit v1.2.3