diff options
author | wm4 <wm4@nowhere> | 2016-11-25 21:00:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-11-25 21:17:25 +0100 |
commit | 1a2319f3e4cc42c680e2fd3ba30022c7a9adf3fe (patch) | |
tree | 37261ccac2acc614777ba4c790cfed78b96fb58f /options/m_option.h | |
parent | 98a257b3a871587a97f51ef1b09800959a94ed1e (diff) | |
download | mpv-1a2319f3e4cc42c680e2fd3ba30022c7a9adf3fe.tar.bz2 mpv-1a2319f3e4cc42c680e2fd3ba30022c7a9adf3fe.tar.xz |
options: remove deprecated sub-option handling for --vo and --ao
Long planned. Leads to some sanity.
There still are some rather gross things. Especially g_groups is ugly,
and a hack that can hopefully be removed. (There is a plan for it, but
whether it's implemented depends on how much energy is left.)
Diffstat (limited to 'options/m_option.h')
-rw-r--r-- | options/m_option.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/options/m_option.h b/options/m_option.h index d784d8f54d..8faaad2133 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -117,6 +117,8 @@ struct m_obj_desc { const void *priv_defaults; // Options which refer to members in the private struct const struct m_option *options; + // Prefix for each of the above options (none if NULL). + const char *options_prefix; // For free use by the implementer of m_obj_list.get_desc const void *p; // If not NULL, options which should be set before applying other options. @@ -132,10 +134,6 @@ struct m_obj_desc { const char *replaced_name; // For convenience: these are added as global command-line options. const struct m_sub_options *global_opts; - // Evil hack to essentially force-move .options to global_opts. All options - // will be added as global options with the given prefix, and using - // sub-options will be treated as deprecated and redirected. - const char *legacy_prefix; }; // Extra definition needed for \ref m_option_type_obj_settings_list options. @@ -151,6 +149,8 @@ struct m_obj_list { bool allow_unknown_entries; // This helps with confusing error messages if unknown flag options are used. bool disallow_positional_parameters; + // Each sub-item is backed by global options (for AOs and VOs). + bool use_global_options; }; // Find entry by name @@ -188,6 +188,7 @@ typedef int (*m_opt_string_validate_fn)(struct mp_log *log, const m_option_t *op // m_option.priv points to this if OPT_SUBSTRUCT is used struct m_sub_options { + const char *prefix; const struct m_option *opts; size_t size; const void *defaults; @@ -714,12 +715,6 @@ extern const char m_option_path_separator; .type = &m_option_type_subconfig, \ .priv = (void*)&subconf) -// Same as above, but for legacy suboption usage, which have no associated -// field (no actual data anywhere). -#define OPT_SUBSTRUCT_LEGACY(optname, subconf) \ - {.name = optname, .offset = -1, .type = &m_option_type_subconfig, \ - .priv = (void*)&subconf} - // Provide a another name for the option. #define OPT_ALIAS(optname, newname) \ {.name = optname, .type = &m_option_type_alias, .priv = newname, \ |