Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
decce929
Commit
decce929
authored
Jun 01, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nice output of all suffix types supported in version
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1276
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
9e0cbb30
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
23 deletions
+29
-23
inputPlugin.c
src/inputPlugin.c
+18
-0
inputPlugin.h
src/inputPlugin.h
+2
-0
main.c
src/main.c
+9
-23
No files found.
src/inputPlugin.c
View file @
decce929
#include "inputPlugin.h"
#include "list.h"
#include "myfprintf.h"
#include <stdlib.h>
#include <string.h>
...
...
@@ -72,6 +73,23 @@ InputPlugin * getInputPluginFromName(char * name) {
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
oggPlugin
;
extern
InputPlugin
flacPlugin
;
...
...
src/inputPlugin.h
View file @
decce929
...
...
@@ -47,6 +47,8 @@ InputPlugin * getInputPluginFromMimeType(char * mimeType);
InputPlugin
*
getInputPluginFromName
(
char
*
name
);
void
printAllInputPluginSuffixes
(
FILE
*
fp
);
/* this is where we "load" all the "plugins" ;-) */
void
initInputPlugins
();
...
...
src/main.c
View file @
decce929
...
...
@@ -85,30 +85,16 @@ void usage(char * argv[]) {
}
void
version
()
{
ERROR
(
"mpd (MPD: Music Player Daemon) %s
\n
"
,
VERSION
);
ERROR
(
"
\n
"
);
ERROR
(
"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
"
);
ERROR
(
"warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\n
"
);
ERROR
(
"
\n
"
);
ERROR
(
"Supported formats:
\n
"
);
LOG
(
"mpd (MPD: Music Player Daemon) %s
\n
"
,
VERSION
);
LOG
(
"
\n
"
);
LOG
(
"Copyright (C) 2003 Warren Dukes <shank@mercury.chem.pitt.edu>
\n
"
);
LOG
(
"This is free software; see the source for copying conditions. There is NO
\n
"
);
LOG
(
"warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\n
"
);
LOG
(
"
\n
"
);
LOG
(
"Supported formats:
\n
"
);
#ifdef HAVE_AUDIOFILE
ERROR
(
" wav"
);
#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
"
);
initInputPlugins
();
printAllInputPluginSuffixes
(
stdout
);
}
void
parseOptions
(
int
argc
,
char
**
argv
,
Options
*
options
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment