aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:08 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:08 +0200
commite41be362a1dc5691721d72b7f915e32d7f5272bb (patch)
tree296478ef28a6c2a9dbf54e39328b754223459cf2 /src/inputPlugin.c
parentcdaa26c81d692fefe5c9c2a4a01dcff633c99564 (diff)
downloadmpd-e41be362a1dc5691721d72b7f915e32d7f5272bb.tar.gz
mpd-e41be362a1dc5691721d72b7f915e32d7f5272bb.tar.xz
mpd-e41be362a1dc5691721d72b7f915e32d7f5272bb.zip
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.
Diffstat (limited to 'src/inputPlugin.c')
-rw-r--r--src/inputPlugin.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/inputPlugin.c b/src/inputPlugin.c
index 1ab118ceb..5bf2bdaa7 100644
--- a/src/inputPlugin.c
+++ b/src/inputPlugin.c
@@ -17,10 +17,11 @@
*/
#include "inputPlugin.h"
+#include "decoder_api.h"
static List *inputPlugin_list;
-void loadInputPlugin(InputPlugin * inputPlugin)
+void loadInputPlugin(struct decoder_plugin * inputPlugin)
{
if (!inputPlugin)
return;
@@ -33,7 +34,7 @@ void loadInputPlugin(InputPlugin * inputPlugin)
insertInList(inputPlugin_list, inputPlugin->name, (void *)inputPlugin);
}
-void unloadInputPlugin(InputPlugin * inputPlugin)
+void unloadInputPlugin(struct decoder_plugin * inputPlugin)
{
if (inputPlugin->finishFunc)
inputPlugin->finishFunc();
@@ -51,11 +52,11 @@ static int stringFoundInStringArray(const char *const*array, const char *suffix)
return 0;
}
-InputPlugin *getInputPluginFromSuffix(const char *suffix, unsigned int next)
+struct decoder_plugin *getInputPluginFromSuffix(const char *suffix, unsigned int next)
{
static ListNode *pos;
ListNode *node;
- InputPlugin *plugin;
+ struct decoder_plugin *plugin;
if (suffix == NULL)
return NULL;
@@ -80,11 +81,11 @@ InputPlugin *getInputPluginFromSuffix(const char *suffix, unsigned int next)
return NULL;
}
-InputPlugin *getInputPluginFromMimeType(const char *mimeType, unsigned int next)
+struct decoder_plugin *getInputPluginFromMimeType(const char *mimeType, unsigned int next)
{
static ListNode *pos;
ListNode *node;
- InputPlugin *plugin;
+ struct decoder_plugin *plugin;
if (mimeType == NULL)
return NULL;
@@ -103,23 +104,23 @@ InputPlugin *getInputPluginFromMimeType(const char *mimeType, unsigned int next)
return NULL;
}
-InputPlugin *getInputPluginFromName(const char *name)
+struct decoder_plugin *getInputPluginFromName(const char *name)
{
void *plugin = NULL;
findInList(inputPlugin_list, name, &plugin);
- return (InputPlugin *) plugin;
+ return (struct decoder_plugin *) plugin;
}
void printAllInputPluginSuffixes(FILE * fp)
{
ListNode *node = inputPlugin_list->firstNode;
- InputPlugin *plugin;
+ struct decoder_plugin *plugin;
const char *const*suffixes;
while (node) {
- plugin = (InputPlugin *) node->data;
+ plugin = (struct decoder_plugin *) node->data;
suffixes = plugin->suffixes;
while (suffixes && *suffixes) {
fprintf(fp, "%s ", *suffixes);