summaryrefslogtreecommitdiff
path: root/decoder.h
diff options
context:
space:
mode:
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;
};