aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViliam Mateicka <viliam.mateicka@gmail.com>2008-12-30 14:08:59 +0100
committerMax Kellermann <max@duempel.org>2008-12-30 14:17:15 +0100
commit4cc0caf1af38fe0f2b43e54ff607852553b5510d (patch)
treed8b58acdebf643abbd555a9ae6970a8effde9609
parentd38a7967ab2bf5c2924a74d46bfe9fe636fd17cd (diff)
downloadmpd-4cc0caf1af38fe0f2b43e54ff607852553b5510d.tar.gz
mpd-4cc0caf1af38fe0f2b43e54ff607852553b5510d.tar.xz
mpd-4cc0caf1af38fe0f2b43e54ff607852553b5510d.zip
print supported decoders in --version
-rw-r--r--src/cmdline.c4
-rw-r--r--src/decoder_list.c13
-rw-r--r--src/decoder_list.h2
3 files changed, 19 insertions, 0 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index f1d3bcc7d..e01521005 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -50,6 +50,10 @@ static void version(void)
decoder_plugin_print_all_suffixes(stdout);
puts("\n"
+ "Supported decoders:\n");
+ decoder_plugin_print_all_decoders(stdout);
+
+ puts("\n"
"Supported outputs:\n");
printAllOutputPluginTypes(stdout);
diff --git a/src/decoder_list.c b/src/decoder_list.c
index 6fe434e03..779b5c1af 100644
--- a/src/decoder_list.c
+++ b/src/decoder_list.c
@@ -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) {
diff --git a/src/decoder_list.h b/src/decoder_list.h
index 80ade3312..bde6b3806 100644
--- a/src/decoder_list.h
+++ b/src/decoder_list.h
@@ -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);