From 3cdf4cf14d48bfb2eff2806da96f684175a71eb8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 21 Jul 2013 22:03:53 +0200 Subject: 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. --- audio/out/ao.c | 1 + core/m_option.c | 6 ++++-- core/m_option.h | 2 ++ video/out/vo.c | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/audio/out/ao.c b/audio/out/ao.c index 522acc21c1..6227891d57 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -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; diff --git a/core/m_option.c b/core/m_option.c index 3a14564830..4ee8ba97ad 100644 --- a/core/m_option.c +++ b/core/m_option.c @@ -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; diff --git a/core/m_option.h b/core/m_option.h index 7fd1ffd04c..73f3fabee8 100644 --- a/core/m_option.h +++ b/core/m_option.h @@ -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. diff --git a/video/out/vo.c b/video/out/vo.c index 17ce53379f..474d4e0c52 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -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; -- cgit v1.2.3