aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-29 15:54:27 +0200
committerMax Kellermann <max@duempel.org>2008-09-29 15:54:27 +0200
commit21d3d300fdfa5d5e65bf22ec59fd37550d3c2dac (patch)
treea1e59b7c540df8955de3a79620d3bcfd102a4095 /src/decoder_thread.c
parenta7651b9d307efe2473bd68510aa9a6225e7a0b64 (diff)
downloadmpd-21d3d300fdfa5d5e65bf22ec59fd37550d3c2dac.tar.gz
mpd-21d3d300fdfa5d5e65bf22ec59fd37550d3c2dac.tar.xz
mpd-21d3d300fdfa5d5e65bf22ec59fd37550d3c2dac.zip
decoder: renamed plugin methods
Why have a "_func" prefix on all method names? Also don't typedef the methods, there is no advantage in that.
Diffstat (limited to '')
-rw-r--r--src/decoder_thread.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index 0b2a6dc2d..eff3ca05f 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -81,14 +81,14 @@ static void decodeStart(void)
/* first we try mime types: */
while (ret && (plugin = decoder_plugin_from_mime_type(inStream.mime, next++))) {
- if (!plugin->stream_decode_func)
+ if (plugin->stream_decode == NULL)
continue;
if (!(plugin->stream_types & INPUT_PLUGIN_STREAM_URL))
continue;
- if (plugin->try_decode_func
- && !plugin->try_decode_func(&inStream))
+ if (plugin->try_decode != NULL
+ && !plugin->try_decode(&inStream))
continue;
- ret = plugin->stream_decode_func(&decoder, &inStream);
+ ret = plugin->stream_decode(&decoder, &inStream);
break;
}
@@ -97,17 +97,17 @@ static void decodeStart(void)
const char *s = getSuffix(path_max_utf8);
next = 0;
while (ret && (plugin = decoder_plugin_from_suffix(s, next++))) {
- if (!plugin->stream_decode_func)
+ if (plugin->stream_decode == NULL)
continue;
if (!(plugin->stream_types &
INPUT_PLUGIN_STREAM_URL))
continue;
- if (plugin->try_decode_func &&
- !plugin->try_decode_func(&inStream))
+ if (plugin->try_decode != NULL &&
+ !plugin->try_decode(&inStream))
continue;
decoder.plugin = plugin;
- ret = plugin->stream_decode_func(&decoder,
- &inStream);
+ ret = plugin->stream_decode(&decoder,
+ &inStream);
break;
}
}
@@ -119,8 +119,8 @@ static void decodeStart(void)
* need to check for stream{Types,DecodeFunc} */
if ((plugin = decoder_plugin_from_name("mp3"))) {
decoder.plugin = plugin;
- ret = plugin->stream_decode_func(&decoder,
- &inStream);
+ ret = plugin->stream_decode(&decoder,
+ &inStream);
}
}
} else {
@@ -130,21 +130,21 @@ static void decodeStart(void)
if (!plugin->stream_types & INPUT_PLUGIN_STREAM_FILE)
continue;
- if (plugin->try_decode_func &&
- !plugin->try_decode_func(&inStream))
+ if (plugin->try_decode != NULL &&
+ !plugin->try_decode(&inStream))
continue;
- if (plugin->file_decode_func) {
+ if (plugin->file_decode != NULL) {
closeInputStream(&inStream);
close_instream = 0;
decoder.plugin = plugin;
- ret = plugin->file_decode_func(&decoder,
- path_max_fs);
+ ret = plugin->file_decode(&decoder,
+ path_max_fs);
break;
- } else if (plugin->stream_decode_func) {
+ } else if (plugin->stream_decode != NULL) {
decoder.plugin = plugin;
- ret = plugin->stream_decode_func(&decoder,
- &inStream);
+ ret = plugin->stream_decode(&decoder,
+ &inStream);
break;
}
}