options: hide encoding AO/VO in help output

These can't be used manually. Encoding is enabled with -o instead, and
the encoding AO/VO is selected using internal mechanisms.
This commit is contained in:
wm4 2013-07-21 22:03:53 +02:00
parent 2111d7bc05
commit 3cdf4cf14d
4 changed files with 8 additions and 2 deletions

View File

@ -107,6 +107,7 @@ static bool get_desc(struct m_obj_desc *dst, int index)
.priv_size = ao->priv_size,
.priv_defaults = ao->priv_defaults,
.options = ao->options,
.hidden = ao->encode,
.p = ao,
};
return true;

View File

@ -2283,8 +2283,10 @@ static int parse_obj_settings_list(const m_option_t *opt, struct bstr name,
struct m_obj_desc desc;
if (!ol->get_desc(&desc, n))
break;
mp_msg(MSGT_CFGPARSER, MSGL_INFO, " %-15s: %s\n",
desc.name, desc.description);
if (!desc.hidden) {
mp_msg(MSGT_CFGPARSER, MSGL_INFO, " %-15s: %s\n",
desc.name, desc.description);
}
}
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n");
return M_OPT_EXIT - 1;

View File

@ -110,6 +110,8 @@ struct m_obj_desc {
// This member is usually set my m_obj_list_find() only.
// Only works if options is not NULL.
const char *init_options;
// Don't list entries with "help"
bool hidden;
};
// Extra definition needed for \ref m_option_type_obj_settings_list options.

View File

@ -115,6 +115,7 @@ static bool get_desc(struct m_obj_desc *dst, int index)
.priv_defaults = vo->priv_defaults,
.options = vo->options,
.init_options = vo->init_option_string,
.hidden = vo->encode,
.p = vo,
};
return true;