cmdline: print out list of encoders in --version info
This commit is contained in:
		| @@ -1173,6 +1173,10 @@ if test x$enable_httpd_output = xyes; then | |||||||
| fi | fi | ||||||
|  |  | ||||||
| AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes) | AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes) | ||||||
|  | if test x$enable_encoder = xyes; then | ||||||
|  | 	AC_DEFINE(ENABLE_ENCODER, 1, | ||||||
|  | 		[Define to enable the encoder plugins]) | ||||||
|  | fi | ||||||
|  |  | ||||||
| AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes) | AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes) | ||||||
| if test x$enable_vorbis_encoder = xyes; then | if test x$enable_vorbis_encoder = xyes; then | ||||||
|   | |||||||
| @@ -27,6 +27,10 @@ | |||||||
| #include "output_list.h" | #include "output_list.h" | ||||||
| #include "ls.h" | #include "ls.h" | ||||||
|  |  | ||||||
|  | #ifdef ENABLE_ENCODER | ||||||
|  | #include "encoder_list.h" | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #ifdef ENABLE_ARCHIVE | #ifdef ENABLE_ARCHIVE | ||||||
| #include "archive_list.h" | #include "archive_list.h" | ||||||
| #endif | #endif | ||||||
| @@ -82,6 +86,13 @@ static void version(void) | |||||||
| 	     "Supported outputs:\n"); | 	     "Supported outputs:\n"); | ||||||
| 	audio_output_plugin_print_all_types(stdout); | 	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 | #ifdef ENABLE_ARCHIVE | ||||||
| 	puts("\n" | 	puts("\n" | ||||||
| 	     "Supported archives:\n"); | 	     "Supported archives:\n"); | ||||||
|   | |||||||
| @@ -59,3 +59,13 @@ encoder_plugin_get(const char *name) | |||||||
|  |  | ||||||
| 	return NULL; | 	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); | ||||||
|  | } | ||||||
|   | |||||||
| @@ -20,6 +20,8 @@ | |||||||
| #ifndef MPD_ENCODER_LIST_H | #ifndef MPD_ENCODER_LIST_H | ||||||
| #define MPD_ENCODER_LIST_H | #define MPD_ENCODER_LIST_H | ||||||
|  |  | ||||||
|  | #include <stdio.h> | ||||||
|  |  | ||||||
| struct encoder_plugin; | struct encoder_plugin; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -32,4 +34,7 @@ struct encoder_plugin; | |||||||
| const struct encoder_plugin * | const struct encoder_plugin * | ||||||
| encoder_plugin_get(const char *name); | encoder_plugin_get(const char *name); | ||||||
|  |  | ||||||
|  | void | ||||||
|  | encoder_plugin_print_all_types(FILE * fp); | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Viliam Mateicka
					Viliam Mateicka