summaryrefslogtreecommitdiff
path: root/encoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoder.c')
-rw-r--r--encoder.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/encoder.c b/encoder.c
new file mode 100644
index 0000000..72bca9d
--- /dev/null
+++ b/encoder.c
@@ -0,0 +1,15 @@
+#include "encoder.h"
+
+gboolean encoder_init(struct encoder *encoder) {
+ return encoder->encoder->init(&encoder->data);
+}
+
+gssize encoder_encode(struct encoder *encoder, const guchar *inbuf, gsize inbuf_size,
+ guchar *outbuf, gsize outbuf_size) {
+ return encoder->encoder->encode(encoder->data, inbuf, inbuf_size,
+ outbuf, outbuf_size);
+}
+
+void encoder_close(struct encoder *encoder) {
+ encoder->encoder->close(encoder->data);
+}