Mercurial > mplayer.hg
diff m_config.c @ 17472:526abfe30498
Make -list-options work in both MPlayer and MEncoder.
author | albeu |
---|---|
date | Tue, 24 Jan 2006 11:34:24 +0000 |
parents | 63909962d3fc |
children | 99c0caec4677 |
line wrap: on
line diff
--- a/m_config.c Tue Jan 24 11:16:13 2006 +0000 +++ b/m_config.c Tue Jan 24 11:34:24 2006 +0000 @@ -27,6 +27,9 @@ 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 @@ 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 @@ 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; +}