From 21d3d300fdfa5d5e65bf22ec59fd37550d3c2dac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Sep 2008 15:54:27 +0200 Subject: 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. --- src/decoder_thread.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/decoder_thread.c') 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; } } -- cgit v1.2.3