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@xiph.org> 5 * 6 * VCEdit header. 7 * 8 * last modified: $ID:$ 9 */ 10 11 #pragma once 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 21 typedef size_t (*vcedit_read_func)(void *, size_t, size_t, void *); 22 typedef size_t (*vcedit_write_func)(const void *, size_t, size_t, void *); 23 24 typedef struct { 25 long *streams; 26 size_t streams_len; 27 } vcedit_serial_nos; 28 29 typedef struct { 30 ogg_sync_state *oy; 31 ogg_stream_state *os; 32 33 vorbis_comment *vc; 34 vorbis_info *vi; 35 36 vcedit_read_func read; 37 vcedit_write_func write; 38 39 void *in; 40 int serial; 41 vcedit_serial_nos serials; 42 unsigned char *mainbuf; 43 unsigned char *bookbuf; 44 int mainlen; 45 int booklen; 46 char *lasterror; 47 char *vendor; 48 int prevW; 49 int extrapage; 50 int eosin; 51 struct vcedit_buffer_chain *sidebuf; 52 } vcedit_state; 53 54 extern vcedit_state * vcedit_new_state(void); 55 extern void vcedit_clear(vcedit_state *state); 56 extern vorbis_comment * vcedit_comments(vcedit_state *state); 57 /* kid3 vcedit_open() removed */ 58 extern int vcedit_open_callbacks(vcedit_state *state, void *in, 59 vcedit_read_func read_func, vcedit_write_func write_func); 60 extern int vcedit_write(vcedit_state *state, void *out); 61 extern char * vcedit_error(vcedit_state *state); 62 63 #ifdef __cplusplus 64 } 65 #endif 66