61
|
1 /* This program is licensed under the GNU Library General Public License, version 2,
|
|
2 * a copy of which is included with this program (with filename LICENSE.LGPL).
|
|
3 *
|
|
4 * (c) 2000-2001 Michael Smith <msmith@labyrinth.net.au>
|
|
5 *
|
|
6 * VCEdit header.
|
|
7 *
|
|
8 */
|
|
9
|
|
10 #ifndef __VCEDIT_H
|
|
11 #define __VCEDIT_H
|
|
12
|
|
13 #ifdef __cplusplus
|
|
14 extern "C" {
|
|
15 #endif
|
|
16
|
|
17 #include <stdio.h>
|
|
18 #include <ogg/ogg.h>
|
|
19 #include <vorbis/codec.h>
|
|
20 #include <libaudacious/vfs.h>
|
|
21
|
|
22 typedef size_t (*vcedit_read_func)(void *, size_t, size_t, void *);
|
|
23 typedef size_t (*vcedit_write_func)(const void *, size_t, size_t, void *);
|
|
24
|
|
25 typedef struct {
|
|
26 ogg_sync_state *oy;
|
|
27 ogg_stream_state *os;
|
|
28
|
|
29 vorbis_comment *vc;
|
|
30 vorbis_info vi;
|
|
31
|
|
32 vcedit_read_func read;
|
|
33 vcedit_write_func write;
|
|
34
|
|
35 void *in;
|
|
36 long serial;
|
|
37 unsigned char *mainbuf;
|
|
38 unsigned char *bookbuf;
|
|
39 int mainlen;
|
|
40 int booklen;
|
|
41 char *lasterror;
|
|
42 char *vendor;
|
|
43 int prevW;
|
|
44 int extrapage;
|
|
45 int eosin;
|
|
46 } vcedit_state;
|
|
47
|
|
48 extern vcedit_state *vcedit_new_state(void);
|
|
49 extern void vcedit_clear(vcedit_state *state);
|
|
50 extern vorbis_comment *vcedit_comments(vcedit_state *state);
|
|
51 extern int vcedit_open(vcedit_state *state, VFSFile *in);
|
|
52 extern int vcedit_open_callbacks(vcedit_state *state, void *in,
|
|
53 vcedit_read_func read_func,
|
|
54 vcedit_write_func write_func);
|
|
55 extern int vcedit_write(vcedit_state *state, void *out);
|
|
56 extern char *vcedit_error(vcedit_state *state);
|
|
57
|
|
58 #ifdef __cplusplus
|
|
59 }
|
|
60 #endif
|
|
61
|
|
62 #endif /* __VCEDIT_H */
|
|
63
|