diff options
Diffstat (limited to 'decoder.h')
-rw-r--r-- | decoder.h | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,22 +1,30 @@ #ifndef DECODER_H #define DECODER_H +#include "audioformat.h" + #include <glib.h> #include <gio/gio.h> +struct decoder; + struct decoder_plugin { const gchar *name; const gchar * const *extensions; - gboolean (*init)(gpointer *data); - gssize (*decode)(gpointer data, GInputStream *input, + gboolean (*init)(struct decoder *decoder); + gssize (*decode)(struct decoder *decoder, GInputStream *input, GOutputStream *output, GError **error); - void (*close)(gpointer data); + void (*close)(struct decoder *decoder); }; struct decoder { const struct decoder_plugin *decoder; + unsigned int rate; + enum audio_format format; + unsigned int channels; + gpointer data; }; |