Recognizes if input is ogg or not.
[xiph/unicode.git] / vorbis-python / src / vcedit.h
blobce8b3c1a66671ae24033000753a8ebf7540edad1
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).
4 * (c) 2000-2001 Michael Smith <msmith@xiph.org>
6 * VCEdit header.
8 * last modified: $ID:$
9 */
11 #ifndef __VCEDIT_H
12 #define __VCEDIT_H
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
18 #include <stdio.h>
19 #include <ogg/ogg.h>
20 #include <vorbis/codec.h>
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 *);
25 typedef struct {
26 ogg_sync_state *oy;
27 ogg_stream_state *os;
29 vorbis_comment *vc;
30 vorbis_info vi;
32 vcedit_read_func read;
33 vcedit_write_func write;
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;
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, FILE *in);
52 extern int vcedit_open_callbacks(vcedit_state *state, void *in,
53 vcedit_read_func read_func, vcedit_write_func write_func);
54 extern int vcedit_write(vcedit_state *state, void *out);
55 extern char * vcedit_error(vcedit_state *state);
57 #ifdef __cplusplus
59 #endif
61 #endif /* __VCEDIT_H */