nice output of all suffix types supported in version
git-svn-id: https://svn.musicpd.org/mpd/trunk@1276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
9e0cbb30f4
commit
decce92949
@ -1,6 +1,7 @@
|
|||||||
#include "inputPlugin.h"
|
#include "inputPlugin.h"
|
||||||
|
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
#include "myfprintf.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -72,6 +73,23 @@ InputPlugin * getInputPluginFromName(char * name) {
|
|||||||
return (InputPlugin *)plugin;
|
return (InputPlugin *)plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void printAllInputPluginSuffixes(FILE * fp) {
|
||||||
|
ListNode * node = inputPlugin_list->firstNode;
|
||||||
|
InputPlugin * plugin;
|
||||||
|
char ** suffixes;
|
||||||
|
|
||||||
|
while(node) {
|
||||||
|
plugin = (InputPlugin *)node->data;
|
||||||
|
suffixes = plugin->suffixes;
|
||||||
|
while(suffixes && *suffixes) {
|
||||||
|
myfprintf(fp, "%s ", *suffixes);
|
||||||
|
suffixes++;
|
||||||
|
}
|
||||||
|
node = node->nextNode;
|
||||||
|
}
|
||||||
|
myfprintf(fp, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
extern InputPlugin mp3Plugin;
|
extern InputPlugin mp3Plugin;
|
||||||
extern InputPlugin oggPlugin;
|
extern InputPlugin oggPlugin;
|
||||||
extern InputPlugin flacPlugin;
|
extern InputPlugin flacPlugin;
|
||||||
|
@ -47,6 +47,8 @@ InputPlugin * getInputPluginFromMimeType(char * mimeType);
|
|||||||
|
|
||||||
InputPlugin * getInputPluginFromName(char * name);
|
InputPlugin * getInputPluginFromName(char * name);
|
||||||
|
|
||||||
|
void printAllInputPluginSuffixes(FILE * fp);
|
||||||
|
|
||||||
/* this is where we "load" all the "plugins" ;-) */
|
/* this is where we "load" all the "plugins" ;-) */
|
||||||
void initInputPlugins();
|
void initInputPlugins();
|
||||||
|
|
||||||
|
32
src/main.c
32
src/main.c
@ -85,30 +85,16 @@ void usage(char * argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void version() {
|
void version() {
|
||||||
ERROR("mpd (MPD: Music Player Daemon) %s\n",VERSION);
|
LOG("mpd (MPD: Music Player Daemon) %s\n",VERSION);
|
||||||
ERROR("\n");
|
LOG("\n");
|
||||||
ERROR("Copyright (C) 2003 Warren Dukes <shank@mercury.chem.pitt.edu>\n");
|
LOG("Copyright (C) 2003 Warren Dukes <shank@mercury.chem.pitt.edu>\n");
|
||||||
ERROR("This is free software; see the source for copying conditions. There is NO\n");
|
LOG("This is free software; see the source for copying conditions. There is NO\n");
|
||||||
ERROR("warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
|
LOG("warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
|
||||||
ERROR("\n");
|
LOG("\n");
|
||||||
ERROR("Supported formats:\n");
|
LOG("Supported formats:\n");
|
||||||
|
|
||||||
#ifdef HAVE_AUDIOFILE
|
initInputPlugins();
|
||||||
ERROR(" wav");
|
printAllInputPluginSuffixes(stdout);
|
||||||
#endif
|
|
||||||
#ifdef HAVE_MAD
|
|
||||||
ERROR(" mp3");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_FAAD
|
|
||||||
ERROR(" mp4 aac");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_FLAC
|
|
||||||
ERROR(" flac");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_OGG
|
|
||||||
ERROR(" ogg");
|
|
||||||
#endif
|
|
||||||
ERROR("\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void parseOptions(int argc, char ** argv, Options * options) {
|
void parseOptions(int argc, char ** argv, Options * options) {
|
||||||
|
Loading…
Reference in New Issue
Block a user