diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-10-13 19:04:46 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-10-13 19:04:46 +0200 |
commit | af96e1ce92c751f92cdb862985d1abe7362a6e59 (patch) | |
tree | becd9199f426f2b53cca4f40eba443e8a6e94196 /decoder.h | |
parent | 18399d8f41e0154af266f43fd4a05420cb335aa7 (diff) |
Resample files when transcoding to mp3 using libsamplerate.
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; }; |