blob: e55dfb0c2f9df35512e9d4fd72237f220761af11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef _ENCODER_H_
#define _ENCODER_H_
#include <glib.h>
#include <gio/gio.h>
struct encoder_plugin {
const gchar *name;
gboolean (*init)(gpointer *data);
gssize (*encode)(gpointer data, const guchar *inbuf, gsize inbuf_size,
guchar *outbuf, gsize outbuf_size);
void (*close)(gpointer data);
};
struct encoder {
const struct encoder_plugin *encoder;
gpointer data;
};
extern struct encoder_plugin *encoder_plugniss;
gboolean encoder_init(struct encoder *encoder);
gssize encoder_encode(struct encoder *encoder, const guchar *inbuf, gsize inbuf_size,
guchar *outbuf, gsize outbuf_size);
void encoder_close(struct encoder *encoder);
#endif
|