summaryrefslogtreecommitdiff
path: root/decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder.h')
-rw-r--r--decoder.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/decoder.h b/decoder.h
index 4464a50..e992af9 100644
--- a/decoder.h
+++ b/decoder.h
@@ -10,7 +10,7 @@ struct decoder_plugin {
gboolean (*init)(gpointer *data);
gssize (*decode)(gpointer data, GInputStream *input,
- GOutputStream *output);
+ GOutputStream *output, GError **error);
void (*close)(gpointer data);
};
@@ -22,10 +22,19 @@ struct decoder {
gboolean decoder_init(struct decoder *decoder);
gssize decoder_decode(struct decoder *decoder, GInputStream *input,
- GOutputStream *output);
+ GOutputStream *output, GError **error);
void decoder_close(struct decoder *decoder);
const struct decoder_plugin *decoder_get(const gchar *name);
const struct decoder_plugin *decoder_find(const gchar *filename);
+static inline GQuark decoder_quark() {
+ return g_quark_from_string("decoder");
+}
+
+enum {
+ DECODER_CODE_ERROR = 0,
+ DECODER_CODE_DONE,
+};
+
#endif