From 154aa496e8c18bba3dc10c607987c187f4686ae4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:04 +0200 Subject: 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. --- src/inputPlugin.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/inputPlugin.h') 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 */ -- cgit v1.2.3