summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/decode.c42
-rw-r--r--src/decoder_api.h16
-rw-r--r--src/decoder_list.c8
-rw-r--r--src/inputPlugins/flac_plugin.c10
-rw-r--r--src/song.c4
5 files changed, 41 insertions, 39 deletions
diff --git a/src/decode.c b/src/decode.c
index 176eb6fb9..42b8adb02 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -244,14 +244,14 @@ static void decodeStart(void)
/* first we try mime types: */
while (ret && (plugin = getInputPluginFromMimeType(inStream.mime, next++))) {
- if (!plugin->streamDecodeFunc)
+ if (!plugin->stream_decode_func)
continue;
- if (!(plugin->streamTypes & INPUT_PLUGIN_STREAM_URL))
+ if (!(plugin->stream_types & INPUT_PLUGIN_STREAM_URL))
continue;
- if (plugin->tryDecodeFunc
- && !plugin->tryDecodeFunc(&inStream))
+ if (plugin->try_decode_func
+ && !plugin->try_decode_func(&inStream))
continue;
- ret = plugin->streamDecodeFunc(&decoder, &inStream);
+ ret = plugin->stream_decode_func(&decoder, &inStream);
break;
}
@@ -260,16 +260,17 @@ static void decodeStart(void)
const char *s = getSuffix(path_max_utf8);
next = 0;
while (ret && (plugin = getInputPluginFromSuffix(s, next++))) {
- if (!plugin->streamDecodeFunc)
+ if (!plugin->stream_decode_func)
continue;
- if (!(plugin->streamTypes &
+ if (!(plugin->stream_types &
INPUT_PLUGIN_STREAM_URL))
continue;
- if (plugin->tryDecodeFunc &&
- !plugin->tryDecodeFunc(&inStream))
+ if (plugin->try_decode_func &&
+ !plugin->try_decode_func(&inStream))
continue;
decoder.plugin = plugin;
- ret = plugin->streamDecodeFunc(&decoder, &inStream);
+ ret = plugin->stream_decode_func(&decoder,
+ &inStream);
break;
}
}
@@ -281,31 +282,32 @@ static void decodeStart(void)
* need to check for stream{Types,DecodeFunc} */
if ((plugin = getInputPluginFromName("mp3"))) {
decoder.plugin = plugin;
- ret = plugin->streamDecodeFunc(&decoder,
- &inStream);
+ ret = plugin->stream_decode_func(&decoder,
+ &inStream);
}
}
} else {
unsigned int next = 0;
const char *s = getSuffix(path_max_utf8);
while (ret && (plugin = getInputPluginFromSuffix(s, next++))) {
- if (!plugin->streamTypes & INPUT_PLUGIN_STREAM_FILE)
+ if (!plugin->stream_types & INPUT_PLUGIN_STREAM_FILE)
continue;
- if (plugin->tryDecodeFunc &&
- !plugin->tryDecodeFunc(&inStream))
+ if (plugin->try_decode_func &&
+ !plugin->try_decode_func(&inStream))
continue;
- if (plugin->fileDecodeFunc) {
+ if (plugin->file_decode_func) {
closeInputStream(&inStream);
close_instream = 0;
decoder.plugin = plugin;
- ret = plugin->fileDecodeFunc(&decoder,
- path_max_fs);
+ ret = plugin->file_decode_func(&decoder,
+ path_max_fs);
break;
- } else if (plugin->streamDecodeFunc) {
+ } else if (plugin->stream_decode_func) {
decoder.plugin = plugin;
- ret = plugin->streamDecodeFunc(&decoder, &inStream);
+ ret = plugin->stream_decode_func(&decoder,
+ &inStream);
break;
}
}
diff --git a/src/decoder_api.h b/src/decoder_api.h
index 870cd2912..becaaada6 100644
--- a/src/decoder_api.h
+++ b/src/decoder_api.h
@@ -71,19 +71,19 @@ typedef MpdTag *(*decoder_tag_dup_func) (char *file);
struct decoder_plugin {
const char *name;
- decoder_init_func initFunc;
- decoder_finish_func finishFunc;
- decoder_try_decode_func tryDecodeFunc;
- decoder_stream_decode_func streamDecodeFunc;
- decoder_file_decode_func fileDecodeFunc;
- decoder_tag_dup_func tagDupFunc;
+ decoder_init_func init_func;
+ decoder_finish_func finish_func;
+ decoder_try_decode_func try_decode_func;
+ decoder_stream_decode_func stream_decode_func;
+ decoder_file_decode_func file_decode_func;
+ decoder_tag_dup_func tag_dup_func;
/* one or more of the INPUT_PLUGIN_STREAM_* values OR'd together */
- unsigned char streamTypes;
+ unsigned char stream_types;
/* last element in these arrays must always be a NULL: */
const char *const*suffixes;
- const char *const*mimeTypes;
+ const char *const*mime_types;
};
diff --git a/src/decoder_list.c b/src/decoder_list.c
index 5906fd3c0..7da8147fe 100644
--- a/src/decoder_list.c
+++ b/src/decoder_list.c
@@ -39,7 +39,7 @@ void loadInputPlugin(struct decoder_plugin * inputPlugin)
if (!inputPlugin->name)
return;
- if (inputPlugin->initFunc && inputPlugin->initFunc() < 0)
+ if (inputPlugin->init_func && inputPlugin->init_func() < 0)
return;
insertInList(inputPlugin_list, inputPlugin->name, (void *)inputPlugin);
@@ -47,8 +47,8 @@ void loadInputPlugin(struct decoder_plugin * inputPlugin)
void unloadInputPlugin(struct decoder_plugin * inputPlugin)
{
- if (inputPlugin->finishFunc)
- inputPlugin->finishFunc();
+ if (inputPlugin->finish_func)
+ inputPlugin->finish_func();
deleteFromList(inputPlugin_list, inputPlugin->name);
}
@@ -105,7 +105,7 @@ struct decoder_plugin *getInputPluginFromMimeType(const char *mimeType, unsigned
while (node != NULL) {
plugin = node->data;
- if (stringFoundInStringArray(plugin->mimeTypes, mimeType)) {
+ if (stringFoundInStringArray(plugin->mime_types, mimeType)) {
pos = node->nextNode;
return plugin;
}
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 68caaf58c..c0d24c699 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -526,13 +526,13 @@ static int flac_plugin_init(void)
DEBUG("libFLAC supports OggFLAC, initializing OggFLAC support\n");
assert(oggflacPlugin.name == NULL);
oggflacPlugin.name = "oggflac";
- oggflacPlugin.tryDecodeFunc = oggflac_try_decode;
- oggflacPlugin.streamDecodeFunc = oggflac_decode;
- oggflacPlugin.tagDupFunc = oggflac_tag_dup;
- oggflacPlugin.streamTypes = INPUT_PLUGIN_STREAM_URL |
+ oggflacPlugin.try_decode_func = oggflac_try_decode;
+ oggflacPlugin.stream_decode_func = oggflac_decode;
+ oggflacPlugin.tag_dup_func = oggflac_tag_dup;
+ oggflacPlugin.stream_types = INPUT_PLUGIN_STREAM_URL |
INPUT_PLUGIN_STREAM_FILE;
oggflacPlugin.suffixes = oggflac_suffixes;
- oggflacPlugin.mimeTypes = oggflac_mime_types;
+ oggflacPlugin.mime_types = oggflac_mime_types;
loadInputPlugin(&oggflacPlugin);
return 1;
}
diff --git a/src/song.c b/src/song.c
index 42d9d8cb5..1149da8bb 100644
--- a/src/song.c
+++ b/src/song.c
@@ -72,7 +72,7 @@ Song *newSong(const char *url, int type, Directory * parentDir)
while (!song->tag && (plugin = isMusic(abs_path,
&(song->mtime),
next++))) {
- song->tag = plugin->tagDupFunc(abs_path);
+ song->tag = plugin->tag_dup_func(abs_path);
}
if (!song->tag || song->tag->time < 0) {
freeSong(song);
@@ -303,7 +303,7 @@ int updateSongInfo(Song * song)
while (!song->tag && (plugin = isMusic(abs_path,
&(song->mtime),
next++))) {
- song->tag = plugin->tagDupFunc(abs_path);
+ song->tag = plugin->tag_dup_func(abs_path);
}
if (!song->tag || song->tag->time < 0)
return -1;