File indexing completed on 2024-05-19 04:56:32
0001 /* This program is licensed under the GNU Library General Public License, version 2, 0002 * a copy of which is included with this program (with filename LICENSE.LGPL). 0003 * 0004 * (c) 2000-2001 Michael Smith <msmith@xiph.org> 0005 * 0006 * VCEdit header. 0007 * 0008 * last modified: $ID:$ 0009 */ 0010 0011 #pragma once 0012 0013 #ifdef __cplusplus 0014 extern "C" { 0015 #endif 0016 0017 #include <stdio.h> 0018 #include <ogg/ogg.h> 0019 #include <vorbis/codec.h> 0020 0021 typedef size_t (*vcedit_read_func)(void *, size_t, size_t, void *); 0022 typedef size_t (*vcedit_write_func)(const void *, size_t, size_t, void *); 0023 0024 typedef struct { 0025 long *streams; 0026 size_t streams_len; 0027 } vcedit_serial_nos; 0028 0029 typedef struct { 0030 ogg_sync_state *oy; 0031 ogg_stream_state *os; 0032 0033 vorbis_comment *vc; 0034 vorbis_info *vi; 0035 0036 vcedit_read_func read; 0037 vcedit_write_func write; 0038 0039 void *in; 0040 int serial; 0041 vcedit_serial_nos serials; 0042 unsigned char *mainbuf; 0043 unsigned char *bookbuf; 0044 int mainlen; 0045 int booklen; 0046 char *lasterror; 0047 char *vendor; 0048 int prevW; 0049 int extrapage; 0050 int eosin; 0051 struct vcedit_buffer_chain *sidebuf; 0052 } vcedit_state; 0053 0054 extern vcedit_state * vcedit_new_state(void); 0055 extern void vcedit_clear(vcedit_state *state); 0056 extern vorbis_comment * vcedit_comments(vcedit_state *state); 0057 /* kid3 vcedit_open() removed */ 0058 extern int vcedit_open_callbacks(vcedit_state *state, void *in, 0059 vcedit_read_func read_func, vcedit_write_func write_func); 0060 extern int vcedit_write(vcedit_state *state, void *out); 0061 extern char * vcedit_error(vcedit_state *state); 0062 0063 #ifdef __cplusplus 0064 } 0065 #endif