aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cmdline.c11
-rw-r--r--src/encoder_list.c10
-rw-r--r--src/encoder_list.h5
3 files changed, 26 insertions, 0 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index 48b16325e..908e8f27d 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -27,6 +27,10 @@
#include "output_list.h"
#include "ls.h"
+#ifdef ENABLE_ENCODER
+#include "encoder_list.h"
+#endif
+
#ifdef ENABLE_ARCHIVE
#include "archive_list.h"
#endif
@@ -82,6 +86,13 @@ static void version(void)
"Supported outputs:\n");
audio_output_plugin_print_all_types(stdout);
+#ifdef ENABLE_ENCODER
+ puts("\n"
+ "Supported encoders:\n");
+ encoder_plugin_print_all_types(stdout);
+#endif
+
+
#ifdef ENABLE_ARCHIVE
puts("\n"
"Supported archives:\n");
diff --git a/src/encoder_list.c b/src/encoder_list.c
index d5f0db65a..d86753d50 100644
--- a/src/encoder_list.c
+++ b/src/encoder_list.c
@@ -59,3 +59,13 @@ encoder_plugin_get(const char *name)
return NULL;
}
+
+void
+encoder_plugin_print_all_types(FILE * fp)
+{
+ for (unsigned i = 0; encoder_plugins[i] != NULL; ++i)
+ fprintf(fp, "%s ", encoder_plugins[i]->name);
+
+ fprintf(fp, "\n");
+ fflush(fp);
+}
diff --git a/src/encoder_list.h b/src/encoder_list.h
index bc20ad8c5..26caab242 100644
--- a/src/encoder_list.h
+++ b/src/encoder_list.h
@@ -20,6 +20,8 @@
#ifndef MPD_ENCODER_LIST_H
#define MPD_ENCODER_LIST_H
+#include <stdio.h>
+
struct encoder_plugin;
/**
@@ -32,4 +34,7 @@ struct encoder_plugin;
const struct encoder_plugin *
encoder_plugin_get(const char *name);
+void
+encoder_plugin_print_all_types(FILE * fp);
+
#endif