aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_list.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-07 15:14:16 +0100
committerMax Kellermann <max@duempel.org>2009-11-07 15:14:16 +0100
commit5d55b45654eacd479a93673f9ec9ad3627952a96 (patch)
tree4602220efc2da432bc1aac9a828f3694064a9af5 /src/decoder_list.h
parente3da174fca30c493ec311e41ad3dc6795053757d (diff)
downloadmpd-5d55b45654eacd479a93673f9ec9ad3627952a96.tar.gz
mpd-5d55b45654eacd479a93673f9ec9ad3627952a96.tar.xz
mpd-5d55b45654eacd479a93673f9ec9ad3627952a96.zip
decoder_list: pass previous plugin pointer to lookup functions
Remove the static integer hack, that's not thread safe and sucks.
Diffstat (limited to 'src/decoder_list.h')
-rw-r--r--src/decoder_list.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/decoder_list.h b/src/decoder_list.h
index 23788189c..3b3cfd040 100644
--- a/src/decoder_list.h
+++ b/src/decoder_list.h
@@ -26,8 +26,16 @@ struct decoder_plugin;
/* interface for using plugins */
+/**
+ * Find the next enabled decoder plugin which supports the specified suffix.
+ *
+ * @param suffix the file name suffix
+ * @param plugin the previous plugin, or NULL to find the first plugin
+ * @return a plugin, or NULL if none matches
+ */
const struct decoder_plugin *
-decoder_plugin_from_suffix(const char *suffix, unsigned int next);
+decoder_plugin_from_suffix(const char *suffix,
+ const struct decoder_plugin *plugin);
const struct decoder_plugin *
decoder_plugin_from_mime_type(const char *mimeType, unsigned int next);