print supported decoders in --version

This commit is contained in:
Viliam Mateicka 2008-12-30 14:08:59 +01:00 committed by Max Kellermann
parent d38a7967ab
commit 4cc0caf1af
3 changed files with 19 additions and 0 deletions

View File

@ -49,6 +49,10 @@ static void version(void)
decoder_plugin_init_all();
decoder_plugin_print_all_suffixes(stdout);
puts("\n"
"Supported decoders:\n");
decoder_plugin_print_all_decoders(stdout);
puts("\n"
"Supported outputs:\n");
printAllOutputPluginTypes(stdout);

View File

@ -157,6 +157,19 @@ void decoder_plugin_print_all_suffixes(FILE * fp)
fflush(fp);
}
void decoder_plugin_print_all_decoders(FILE * fp)
{
for (unsigned i = 0; i < num_decoder_plugins; ++i) {
const struct decoder_plugin *plugin = decoder_plugins[i];
if (!decoder_plugins_enabled[i])
continue;
fprintf(fp, "%s ", plugin->name);
}
fprintf(fp, "\n");
fflush(fp);
}
void decoder_plugin_init_all(void)
{
for (unsigned i = 0; i < num_decoder_plugins; ++i) {

View File

@ -36,6 +36,8 @@ decoder_plugin_from_name(const char *name);
void decoder_plugin_print_all_suffixes(FILE * fp);
void decoder_plugin_print_all_decoders(FILE * fp);
/* this is where we "load" all the "plugins" ;-) */
void decoder_plugin_init_all(void);