summaryrefslogtreecommitdiffstats
path: root/m_config.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-24 11:34:24 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-24 11:34:24 +0000
commit7f289744339f079b91ea4f04ea2b0c614b51bd95 (patch)
tree6e571815c33a086d1ce768d3ded79d56e6fffd59 /m_config.c
parentd4d62bbc657d3e5105336642fff1d58f6e7d15d8 (diff)
downloadmpv-7f289744339f079b91ea4f04ea2b0c614b51bd95.tar.bz2
mpv-7f289744339f079b91ea4f04ea2b0c614b51bd95.tar.xz
Make -list-options work in both MPlayer and MEncoder.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17473 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_config.c')
-rw-r--r--m_config.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/m_config.c b/m_config.c
index 78ba5a3567..4973f5afe0 100644
--- a/m_config.c
+++ b/m_config.c
@@ -27,6 +27,9 @@ show_profile(m_option_t *opt, char* name, char *param);
static void
m_config_add_option(m_config_t *config, m_option_t *arg, char* prefix);
+static int
+list_options(m_option_t *opt, char* name, char *param);
+
m_config_t*
m_config_new(void) {
m_config_t* config;
@@ -35,6 +38,7 @@ m_config_new(void) {
static m_option_t ref_opts[] = {
{ "profile", NULL, &profile_opt_type, CONF_NOSAVE, 0, 0, NULL },
{ "show-profile", show_profile, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },
+ { "list-options", list_options, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },
{ NULL, NULL, NULL, 0, 0, 0, NULL }
};
int i;
@@ -576,3 +580,10 @@ show_profile(m_option_t *opt, char* name, char *param) {
if(!config->profile_depth) mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n");
return M_OPT_EXIT-1;
}
+
+static int
+list_options(m_option_t *opt, char* name, char *param) {
+ m_config_t* config = opt->priv;
+ m_config_print_option_list(config);
+ return M_OPT_EXIT;
+}