summaryrefslogtreecommitdiff
path: root/decoder.h
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-10-13 19:04:46 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-10-13 19:04:46 +0200
commitaf96e1ce92c751f92cdb862985d1abe7362a6e59 (patch)
treebecd9199f426f2b53cca4f40eba443e8a6e94196 /decoder.h
parent18399d8f41e0154af266f43fd4a05420cb335aa7 (diff)
Resample files when transcoding to mp3 using libsamplerate.
Diffstat (limited to 'decoder.h')
-rw-r--r--decoder.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/decoder.h b/decoder.h
index e992af9..8335db8 100644
--- a/decoder.h
+++ b/decoder.h
@@ -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;
};