summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-21 22:03:53 +0200
committerwm4 <wm4@nowhere>2013-07-21 23:27:31 +0200
commit3cdf4cf14d48bfb2eff2806da96f684175a71eb8 (patch)
treef41c9d511ccbc677a1141b83eb96d98a33fed3c1
parent2111d7bc05721002299703160e0dc37a5e84a94b (diff)
downloadmpv-3cdf4cf14d48bfb2eff2806da96f684175a71eb8.tar.bz2
mpv-3cdf4cf14d48bfb2eff2806da96f684175a71eb8.tar.xz
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.
-rw-r--r--audio/out/ao.c1
-rw-r--r--core/m_option.c6
-rw-r--r--core/m_option.h2
-rw-r--r--video/out/vo.c1
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;