aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:04 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:04 +0200
commit154aa496e8c18bba3dc10c607987c187f4686ae4 (patch)
tree32a2a35f74e823c5eea21bbfbebef1297fe6e989 /src/inputPlugin.h
parent241cd043ca4f9dd560e6d947a9bf025f58de4ea9 (diff)
downloadmpd-154aa496e8c18bba3dc10c607987c187f4686ae4.tar.gz
mpd-154aa496e8c18bba3dc10c607987c187f4686ae4.tar.xz
mpd-154aa496e8c18bba3dc10c607987c187f4686ae4.zip
added struct decoder
The decoder struct should later be made opaque to the decoder plugin, because maintaining a stable struct ABI is quite difficult. The ABI should only consist of a small number of stable functions.
Diffstat (limited to '')
-rw-r--r--src/inputPlugin.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/inputPlugin.h b/src/inputPlugin.h
index 169781931..2b0e504ba 100644
--- a/src/inputPlugin.h
+++ b/src/inputPlugin.h
@@ -27,6 +27,8 @@
#define INPUT_PLUGIN_STREAM_FILE 0x01
#define INPUT_PLUGIN_STREAM_URL 0x02
+struct decoder;
+
/* optional, set this to NULL if the InputPlugin doesn't have/need one
* this must return < 0 if there is an error and >= 0 otherwise */
typedef int (*InputPlugin_initFunc) (void);
@@ -42,14 +44,16 @@ typedef unsigned int (*InputPlugin_tryDecodeFunc) (InputStream *);
* and networked (HTTP) connections.
*
* returns -1 on error, 0 on success */
-typedef int (*InputPlugin_streamDecodeFunc) (InputStream *);
+typedef int (*InputPlugin_streamDecodeFunc) (struct decoder *,
+ InputStream *);
/* use this if and only if your InputPlugin can only be passed a filename or
* handle as input, and will not allow callbacks to be set (like Ogg-Vorbis
* and FLAC libraries allow)
*
* returns -1 on error, 0 on success */
-typedef int (*InputPlugin_fileDecodeFunc) (char *path);
+typedef int (*InputPlugin_fileDecodeFunc) (struct decoder *,
+ char *path);
/* file should be the full path! Returns NULL if a tag cannot be found
* or read */