renamed InputPlugin to struct decoder_plugin

"decoder plugin" is a better name than "input plugin", since the
plugin does not actually do the input - InputStream does.  Also don't
use typedef, so we can forward-declare it if required.
This commit is contained in:
Max Kellermann
2008-08-26 08:27:08 +02:00
parent cdaa26c81d
commit e41be362a1
18 changed files with 65 additions and 59 deletions

View File

@@ -433,7 +433,7 @@ static MpdTag *aacTagDup(char *file)
static const char *aac_suffixes[] = { "aac", NULL };
static const char *aac_mimeTypes[] = { "audio/aac", "audio/aacp", NULL };
InputPlugin aacPlugin = {
struct decoder_plugin aacPlugin = {
"aac",
NULL,
NULL,
@@ -448,6 +448,6 @@ InputPlugin aacPlugin = {
#else
InputPlugin aacPlugin;
struct decoder_plugin aacPlugin;
#endif /* HAVE_FAAD */

View File

@@ -137,7 +137,7 @@ static MpdTag *audiofileTagDup(char *file)
static const char *audiofileSuffixes[] = { "wav", "au", "aiff", "aif", NULL };
InputPlugin audiofilePlugin = {
struct decoder_plugin audiofilePlugin = {
"audiofile",
NULL,
NULL,
@@ -152,6 +152,6 @@ InputPlugin audiofilePlugin = {
#else
InputPlugin audiofilePlugin;
struct decoder_plugin audiofilePlugin;
#endif /* HAVE_AUDIOFILE */

View File

@@ -469,7 +469,7 @@ static int flac_decode(struct decoder * decoder, InputStream * inStream)
# define flac_plugin_init NULL
#else /* FLAC_API_VERSION_CURRENT >= 7 */
/* some of this stuff is duplicated from oggflac_plugin.c */
extern InputPlugin oggflacPlugin;
extern struct decoder_plugin oggflacPlugin;
static MpdTag *oggflac_tag_dup(char *file)
{
@@ -544,7 +544,7 @@ static const char *flac_mime_types[] = { "audio/x-flac",
"application/x-flac",
NULL };
InputPlugin flacPlugin = {
struct decoder_plugin flacPlugin = {
"flac",
flac_plugin_init,
NULL,
@@ -559,6 +559,6 @@ InputPlugin flacPlugin = {
#else /* !HAVE_FLAC */
InputPlugin flacPlugin;
struct decoder_plugin flacPlugin;
#endif /* HAVE_FLAC */

View File

@@ -262,7 +262,7 @@ static const char *modSuffixes[] = { "amf",
NULL
};
InputPlugin modPlugin = {
struct decoder_plugin modPlugin = {
"mod",
NULL,
mod_finishMikMod,
@@ -277,6 +277,6 @@ InputPlugin modPlugin = {
#else
InputPlugin modPlugin;
struct decoder_plugin modPlugin;
#endif /* HAVE_MIKMOD */

View File

@@ -1110,7 +1110,7 @@ static MpdTag *mp3_tagDup(char *file)
static const char *mp3_suffixes[] = { "mp3", "mp2", NULL };
static const char *mp3_mimeTypes[] = { "audio/mpeg", NULL };
InputPlugin mp3Plugin = {
struct decoder_plugin mp3Plugin = {
"mp3",
mp3_plugin_init,
NULL,
@@ -1124,6 +1124,6 @@ InputPlugin mp3Plugin = {
};
#else
InputPlugin mp3Plugin;
struct decoder_plugin mp3Plugin;
#endif /* HAVE_MAD */

View File

@@ -408,7 +408,7 @@ static MpdTag *mp4TagDup(char *file)
static const char *mp4_suffixes[] = { "m4a", "mp4", NULL };
static const char *mp4_mimeTypes[] = { "audio/mp4", "audio/m4a", NULL };
InputPlugin mp4Plugin = {
struct decoder_plugin mp4Plugin = {
"mp4",
NULL,
NULL,
@@ -423,6 +423,6 @@ InputPlugin mp4Plugin = {
#else
InputPlugin mp4Plugin;
struct decoder_plugin mp4Plugin;
#endif /* HAVE_FAAD */

View File

@@ -313,7 +313,7 @@ static MpdTag *mpcTagDup(char *file)
static const char *mpcSuffixes[] = { "mpc", NULL };
InputPlugin mpcPlugin = {
struct decoder_plugin mpcPlugin = {
"mpc",
NULL,
NULL,
@@ -328,6 +328,6 @@ InputPlugin mpcPlugin = {
#else
InputPlugin mpcPlugin;
struct decoder_plugin mpcPlugin;
#endif /* HAVE_MPCDEC */

View File

@@ -391,7 +391,7 @@ static const char *oggflac_mime_types[] = { "audio/x-flac+ogg",
"application/x-ogg",
NULL };
InputPlugin oggflacPlugin = {
struct decoder_plugin oggflacPlugin = {
"oggflac",
NULL,
NULL,
@@ -406,6 +406,6 @@ InputPlugin oggflacPlugin = {
#else /* !HAVE_FLAC */
InputPlugin oggflacPlugin;
struct decoder_plugin oggflacPlugin;
#endif /* HAVE_OGGFLAC */

View File

@@ -381,7 +381,7 @@ static const char *oggvorbis_MimeTypes[] = { "application/ogg",
"application/x-ogg",
NULL };
InputPlugin oggvorbisPlugin = {
struct decoder_plugin oggvorbisPlugin = {
"oggvorbis",
NULL,
NULL,
@@ -396,6 +396,6 @@ InputPlugin oggvorbisPlugin = {
#else /* !HAVE_OGGVORBIS */
InputPlugin oggvorbisPlugin;
struct decoder_plugin oggvorbisPlugin;
#endif /* HAVE_OGGVORBIS */

View File

@@ -577,7 +577,7 @@ static int wavpack_filedecode(struct decoder * decoder, char *fname)
static char const *wavpackSuffixes[] = { "wv", NULL };
static char const *wavpackMimeTypes[] = { "audio/x-wavpack", NULL };
InputPlugin wavpackPlugin = {
struct decoder_plugin wavpackPlugin = {
"wavpack",
NULL,
NULL,
@@ -592,6 +592,6 @@ InputPlugin wavpackPlugin = {
#else /* !HAVE_WAVPACK */
InputPlugin wavpackPlugin;
struct decoder_plugin wavpackPlugin;
#endif /* !HAVE_WAVPACK */