| 1 | /******************************************************************** |
| 2 | * * |
| 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * |
| 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
| 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
| 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
| 7 | * * |
| 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * |
| 9 | * by the Xiph.Org Foundation http://www.xiph.org/ * |
| 10 | * * |
| 11 | ******************************************************************** |
| 12 | |
| 13 | function: toplevel libogg include |
| 14 | |
| 15 | ********************************************************************/ |
| 16 | #ifndef _ogg_h_ |
| 17 | #define _ogg_h_cxx . . $ `external/vorbis/ogg.h:17:9`! |
| 18 | |
| 19 | #include "melder.h"cxx . . $ `<file>/melder/melder.h`/ |
| 20 | |
| 21 | #include "config_types.h"cxx . . $ `<file>/external/vorbis/config_types.h`/ |
| 22 | |
| 23 | typedef structcxx . . $ $anonymous_type_d401cdaf801be98c_0# { |
| 24 | void *iov_basecxx . . $ $anonymous_type_d401cdaf801be98c_0#iov_base.; |
| 25 | size_tcxx . . $ size_t# iov_lencxx . . $ $anonymous_type_d401cdaf801be98c_0#iov_len.; |
| 26 | } ogg_iovec_tcxx . . $ ogg_iovec_t#; |
| 27 | |
| 28 | typedef structcxx . . $ $anonymous_type_d401cdaf801be98c_1# { |
| 29 | long endbytecxx . . $ $anonymous_type_d401cdaf801be98c_1#endbyte.; |
| 30 | int endbitcxx . . $ $anonymous_type_d401cdaf801be98c_1#endbit.; |
| 31 | |
| 32 | unsigned char *buffercxx . . $ $anonymous_type_d401cdaf801be98c_1#buffer.; |
| 33 | unsigned char *ptrcxx . . $ $anonymous_type_d401cdaf801be98c_1#ptr.; |
| 34 | long storagecxx . . $ $anonymous_type_d401cdaf801be98c_1#storage.; |
| 35 | } oggpack_buffercxx . . $ oggpack_buffer#; |
| 36 | |
| 37 | /* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/ |
| 38 | |
| 39 | typedef structcxx . . $ $anonymous_type_d401cdaf801be98c_2# { |
| 40 | unsigned char *headercxx . . $ $anonymous_type_d401cdaf801be98c_2#header.; |
| 41 | long header_lencxx . . $ $anonymous_type_d401cdaf801be98c_2#header_len.; |
| 42 | unsigned char *bodycxx . . $ $anonymous_type_d401cdaf801be98c_2#body.; |
| 43 | long body_lencxx . . $ $anonymous_type_d401cdaf801be98c_2#body_len.; |
| 44 | } ogg_pagecxx . . $ ogg_page#; |
| 45 | |
| 46 | /* ogg_stream_state contains the current encode/decode state of a logical |
| 47 | Ogg bitstream **********************************************************/ |
| 48 | |
| 49 | typedef structcxx . . $ $anonymous_type_d401cdaf801be98c_3# { |
| 50 | unsigned char *body_datacxx . . $ $anonymous_type_d401cdaf801be98c_3#body_data.; /* bytes from packet bodies */ |
| 51 | long body_storagecxx . . $ $anonymous_type_d401cdaf801be98c_3#body_storage.; /* storage elements allocated */ |
| 52 | long body_fillcxx . . $ $anonymous_type_d401cdaf801be98c_3#body_fill.; /* elements stored; fill mark */ |
| 53 | long body_returnedcxx . . $ $anonymous_type_d401cdaf801be98c_3#body_returned.; /* elements of fill returned */ |
| 54 | |
| 55 | |
| 56 | int *lacing_valscxx . . $ $anonymous_type_d401cdaf801be98c_3#lacing_vals.; /* The values that will go to the segment table */ |
| 57 | ogg_int64_tcxx . . $ ogg_int64_t# *granule_valscxx . . $ $anonymous_type_d401cdaf801be98c_3#granule_vals.; /* granulepos values for headers. Not compact |
| 58 | this way, but it is simple coupled to the |
| 59 | lacing fifo */ |
| 60 | long lacing_storagecxx . . $ $anonymous_type_d401cdaf801be98c_3#lacing_storage.; |
| 61 | long lacing_fillcxx . . $ $anonymous_type_d401cdaf801be98c_3#lacing_fill.; |
| 62 | long lacing_packetcxx . . $ $anonymous_type_d401cdaf801be98c_3#lacing_packet.; |
| 63 | long lacing_returnedcxx . . $ $anonymous_type_d401cdaf801be98c_3#lacing_returned.; |
| 64 | |
| 65 | unsigned char headercxx . . $ $anonymous_type_d401cdaf801be98c_3#header.[282]; /* working space for header encode */ |
| 66 | int header_fillcxx . . $ $anonymous_type_d401cdaf801be98c_3#header_fill.; |
| 67 | |
| 68 | int e_o_scxx . . $ $anonymous_type_d401cdaf801be98c_3#e_o_s.; /* set when we have buffered the last packet in the |
| 69 | logical bitstream */ |
| 70 | int b_o_scxx . . $ $anonymous_type_d401cdaf801be98c_3#b_o_s.; /* set after we've written the initial page |
| 71 | of a logical bitstream */ |
| 72 | long serialnocxx . . $ $anonymous_type_d401cdaf801be98c_3#serialno.; |
| 73 | long pagenocxx . . $ $anonymous_type_d401cdaf801be98c_3#pageno.; |
| 74 | ogg_int64_tcxx . . $ ogg_int64_t# packetnocxx . . $ $anonymous_type_d401cdaf801be98c_3#packetno.; /* sequence number for decode; the framing |
| 75 | knows where there's a hole in the data, |
| 76 | but we need coupling so that the codec |
| 77 | (which is in a separate abstraction |
| 78 | layer) also knows about the gap */ |
| 79 | ogg_int64_tcxx . . $ ogg_int64_t# granuleposcxx . . $ $anonymous_type_d401cdaf801be98c_3#granulepos.; |
| 80 | |
| 81 | } ogg_stream_statecxx . . $ ogg_stream_state#; |
| 82 | |
| 83 | /* ogg_packet is used to encapsulate the data and metadata belonging |
| 84 | to a single raw Ogg/Vorbis packet *************************************/ |
| 85 | |
| 86 | typedef structcxx . . $ $anonymous_type_d401cdaf801be98c_4# { |
| 87 | unsigned char *packetcxx . . $ $anonymous_type_d401cdaf801be98c_4#packet.; |
| 88 | long bytescxx . . $ $anonymous_type_d401cdaf801be98c_4#bytes.; |
| 89 | long b_o_scxx . . $ $anonymous_type_d401cdaf801be98c_4#b_o_s.; |
| 90 | long e_o_scxx . . $ $anonymous_type_d401cdaf801be98c_4#e_o_s.; |
| 91 | |
| 92 | ogg_int64_tcxx . . $ ogg_int64_t# granuleposcxx . . $ $anonymous_type_d401cdaf801be98c_4#granulepos.; |
| 93 | |
| 94 | ogg_int64_tcxx . . $ ogg_int64_t# packetnocxx . . $ $anonymous_type_d401cdaf801be98c_4#packetno.; /* sequence number for decode; the framing |
| 95 | knows where there's a hole in the data, |
| 96 | but we need coupling so that the codec |
| 97 | (which is in a separate abstraction |
| 98 | layer) also knows about the gap */ |
| 99 | } ogg_packetcxx . . $ ogg_packet#; |
| 100 | |
| 101 | typedef structcxx . . $ $anonymous_type_d401cdaf801be98c_5# { |
| 102 | unsigned char *datacxx . . $ $anonymous_type_d401cdaf801be98c_5#data.; |
| 103 | int storagecxx . . $ $anonymous_type_d401cdaf801be98c_5#storage.; |
| 104 | int fillcxx . . $ $anonymous_type_d401cdaf801be98c_5#fill.; |
| 105 | int returnedcxx . . $ $anonymous_type_d401cdaf801be98c_5#returned.; |
| 106 | |
| 107 | int unsyncedcxx . . $ $anonymous_type_d401cdaf801be98c_5#unsynced.; |
| 108 | int headerbytescxx . . $ $anonymous_type_d401cdaf801be98c_5#headerbytes.; |
| 109 | int bodybytescxx . . $ $anonymous_type_d401cdaf801be98c_5#bodybytes.; |
| 110 | } ogg_sync_statecxx . . $ ogg_sync_state#; |
| 111 | |
| 112 | /* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ |
| 113 | |
| 114 | extern void oggpack_writeinitcxx . . $ oggpack_writeinit(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 115 | extern int oggpack_writecheckcxx . . $ oggpack_writecheck(a0413826144d75fb).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 116 | extern void oggpack_writetrunccxx . . $ oggpack_writetrunc(8558430e6adbbe78).(oggpack_buffercxx . . $ oggpack_buffer# *b,long bits); |
| 117 | extern void oggpack_writealigncxx . . $ oggpack_writealign(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 118 | extern void oggpack_writecopycxx . . $ oggpack_writecopy(608dbe3984b1c989).(oggpack_buffercxx . . $ oggpack_buffer# *b,void *source,long bits); |
| 119 | extern void oggpack_resetcxx . . $ oggpack_reset(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 120 | extern void oggpack_writeclearcxx . . $ oggpack_writeclear(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 121 | extern void oggpack_readinitcxx . . $ oggpack_readinit(c5e395f807ba7ecc).(oggpack_buffercxx . . $ oggpack_buffer# *b,unsigned char *buf,int bytes); |
| 122 | extern void oggpack_writecxx . . $ oggpack_write(287f339ee0a6f63e).(oggpack_buffercxx . . $ oggpack_buffer# *b,unsigned long value,int bits); |
| 123 | extern long oggpack_lookcxx . . $ oggpack_look(e96bf1ebf62076a2).(oggpack_buffercxx . . $ oggpack_buffer# *b,int bits); |
| 124 | extern long oggpack_look1cxx . . $ oggpack_look1(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 125 | extern void oggpack_advcxx . . $ oggpack_adv(25543af10c6676a5).(oggpack_buffercxx . . $ oggpack_buffer# *b,int bits); |
| 126 | extern void oggpack_adv1cxx . . $ oggpack_adv1(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 127 | extern long oggpack_readcxx . . $ oggpack_read(e96bf1ebf62076a2).(oggpack_buffercxx . . $ oggpack_buffer# *b,int bits); |
| 128 | extern long oggpack_read1cxx . . $ oggpack_read1(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 129 | extern long oggpack_bytescxx . . $ oggpack_bytes(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 130 | extern long oggpack_bitscxx . . $ oggpack_bits(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 131 | extern unsigned char *oggpack_get_buffercxx . . $ oggpack_get_buffer(4a3469cd6f300fb1).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 132 | |
| 133 | extern void oggpackB_writeinitcxx . . $ oggpackB_writeinit(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 134 | extern int oggpackB_writecheckcxx . . $ oggpackB_writecheck(a0413826144d75fb).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 135 | extern void oggpackB_writetrunccxx . . $ oggpackB_writetrunc(8558430e6adbbe78).(oggpack_buffercxx . . $ oggpack_buffer# *b,long bits); |
| 136 | extern void oggpackB_writealigncxx . . $ oggpackB_writealign(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 137 | extern void oggpackB_writecopycxx . . $ oggpackB_writecopy(608dbe3984b1c989).(oggpack_buffercxx . . $ oggpack_buffer# *b,void *source,long bits); |
| 138 | extern void oggpackB_resetcxx . . $ oggpackB_reset(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 139 | extern void oggpackB_writeclearcxx . . $ oggpackB_writeclear(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 140 | extern void oggpackB_readinitcxx . . $ oggpackB_readinit(c5e395f807ba7ecc).(oggpack_buffercxx . . $ oggpack_buffer# *b,unsigned char *buf,int bytes); |
| 141 | extern void oggpackB_writecxx . . $ oggpackB_write(287f339ee0a6f63e).(oggpack_buffercxx . . $ oggpack_buffer# *b,unsigned long value,int bits); |
| 142 | extern long oggpackB_lookcxx . . $ oggpackB_look(e96bf1ebf62076a2).(oggpack_buffercxx . . $ oggpack_buffer# *b,int bits); |
| 143 | extern long oggpackB_look1cxx . . $ oggpackB_look1(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 144 | extern void oggpackB_advcxx . . $ oggpackB_adv(25543af10c6676a5).(oggpack_buffercxx . . $ oggpack_buffer# *b,int bits); |
| 145 | extern void oggpackB_adv1cxx . . $ oggpackB_adv1(1deda9b593203907).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 146 | extern long oggpackB_readcxx . . $ oggpackB_read(e96bf1ebf62076a2).(oggpack_buffercxx . . $ oggpack_buffer# *b,int bits); |
| 147 | extern long oggpackB_read1cxx . . $ oggpackB_read1(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 148 | extern long oggpackB_bytescxx . . $ oggpackB_bytes(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 149 | extern long oggpackB_bitscxx . . $ oggpackB_bits(ced507c9175a1bd4).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 150 | extern unsigned char *oggpackB_get_buffercxx . . $ oggpackB_get_buffer(4a3469cd6f300fb1).(oggpack_buffercxx . . $ oggpack_buffer# *b); |
| 151 | |
| 152 | /* Ogg BITSTREAM PRIMITIVES: encoding **************************/ |
| 153 | |
| 154 | extern int ogg_stream_packetincxx . . $ ogg_stream_packetin(fd2c2a9865ca08d).(ogg_stream_statecxx . . $ ogg_stream_state# *os, ogg_packetcxx . . $ ogg_packet# *op); |
| 155 | extern int ogg_stream_iovecincxx . . $ ogg_stream_iovecin(e3577989a49fc7d1).(ogg_stream_statecxx . . $ ogg_stream_state# *os, ogg_iovec_tcxx . . $ ogg_iovec_t# *iov, |
| 156 | int count, long e_o_s, ogg_int64_tcxx . . $ ogg_int64_t# granulepos); |
| 157 | extern int ogg_stream_pageoutcxx . . $ ogg_stream_pageout(47b5742f7c1fe496).(ogg_stream_statecxx . . $ ogg_stream_state# *os, ogg_pagecxx . . $ ogg_page# *og); |
| 158 | extern int ogg_stream_pageout_fillcxx . . $ ogg_stream_pageout_fill(83bca150e9015816).(ogg_stream_statecxx . . $ ogg_stream_state# *os, ogg_pagecxx . . $ ogg_page# *og, int nfill); |
| 159 | extern int ogg_stream_flushcxx . . $ ogg_stream_flush(47b5742f7c1fe496).(ogg_stream_statecxx . . $ ogg_stream_state# *os, ogg_pagecxx . . $ ogg_page# *og); |
| 160 | extern int ogg_stream_flush_fillcxx . . $ ogg_stream_flush_fill(83bca150e9015816).(ogg_stream_statecxx . . $ ogg_stream_state# *os, ogg_pagecxx . . $ ogg_page# *og, int nfill); |
| 161 | |
| 162 | /* Ogg BITSTREAM PRIMITIVES: decoding **************************/ |
| 163 | |
| 164 | extern int ogg_sync_initcxx . . $ ogg_sync_init(4d079e1537bb6e53).(ogg_sync_statecxx . . $ ogg_sync_state# *oy); |
| 165 | extern int ogg_sync_clearcxx . . $ ogg_sync_clear(4d079e1537bb6e53).(ogg_sync_statecxx . . $ ogg_sync_state# *oy); |
| 166 | extern int ogg_sync_resetcxx . . $ ogg_sync_reset(4d079e1537bb6e53).(ogg_sync_statecxx . . $ ogg_sync_state# *oy); |
| 167 | extern int ogg_sync_destroycxx . . $ ogg_sync_destroy(4d079e1537bb6e53).(ogg_sync_statecxx . . $ ogg_sync_state# *oy); |
| 168 | extern int ogg_sync_checkcxx . . $ ogg_sync_check(4d079e1537bb6e53).(ogg_sync_statecxx . . $ ogg_sync_state# *oy); |
| 169 | |
| 170 | extern char *ogg_sync_buffercxx . . $ ogg_sync_buffer(16ea7c6d847c120d).(ogg_sync_statecxx . . $ ogg_sync_state# *oy, long size); |
| 171 | extern int ogg_sync_wrotecxx . . $ ogg_sync_wrote(7ecdafb9a73216e5).(ogg_sync_statecxx . . $ ogg_sync_state# *oy, long bytes); |
| 172 | extern long ogg_sync_pageseekcxx . . $ ogg_sync_pageseek(6fecd6648e8334e5).(ogg_sync_statecxx . . $ ogg_sync_state# *oy,ogg_pagecxx . . $ ogg_page# *og); |
| 173 | extern int ogg_sync_pageoutcxx . . $ ogg_sync_pageout(3b569a642bf3da75).(ogg_sync_statecxx . . $ ogg_sync_state# *oy, ogg_pagecxx . . $ ogg_page# *og); |
| 174 | extern int ogg_stream_pageincxx . . $ ogg_stream_pagein(47b5742f7c1fe496).(ogg_stream_statecxx . . $ ogg_stream_state# *os, ogg_pagecxx . . $ ogg_page# *og); |
| 175 | extern int ogg_stream_packetoutcxx . . $ ogg_stream_packetout(fd2c2a9865ca08d).(ogg_stream_statecxx . . $ ogg_stream_state# *os,ogg_packetcxx . . $ ogg_packet# *op); |
| 176 | extern int ogg_stream_packetpeekcxx . . $ ogg_stream_packetpeek(fd2c2a9865ca08d).(ogg_stream_statecxx . . $ ogg_stream_state# *os,ogg_packetcxx . . $ ogg_packet# *op); |
| 177 | |
| 178 | /* Ogg BITSTREAM PRIMITIVES: general ***************************/ |
| 179 | |
| 180 | extern int ogg_stream_initcxx . . $ ogg_stream_init(99ed4282c68df03).(ogg_stream_statecxx . . $ ogg_stream_state# *os,int serialno); |
| 181 | extern int ogg_stream_clearcxx . . $ ogg_stream_clear(d9e3535bee9e7016).(ogg_stream_statecxx . . $ ogg_stream_state# *os); |
| 182 | extern int ogg_stream_resetcxx . . $ ogg_stream_reset(d9e3535bee9e7016).(ogg_stream_statecxx . . $ ogg_stream_state# *os); |
| 183 | extern int ogg_stream_reset_serialnocxx . . $ ogg_stream_reset_serialno(99ed4282c68df03).(ogg_stream_statecxx . . $ ogg_stream_state# *os,int serialno); |
| 184 | extern int ogg_stream_destroycxx . . $ ogg_stream_destroy(d9e3535bee9e7016).(ogg_stream_statecxx . . $ ogg_stream_state# *os); |
| 185 | extern int ogg_stream_checkcxx . . $ ogg_stream_check(d9e3535bee9e7016).(ogg_stream_statecxx . . $ ogg_stream_state# *os); |
| 186 | extern int ogg_stream_eoscxx . . $ ogg_stream_eos(d9e3535bee9e7016).(ogg_stream_statecxx . . $ ogg_stream_state# *os); |
| 187 | |
| 188 | extern void ogg_page_checksum_setcxx . . $ ogg_page_checksum_set(aa359a3548a30162).(ogg_pagecxx . . $ ogg_page# *og); |
| 189 | |
| 190 | extern int ogg_page_versioncxx . . $ ogg_page_version(2b497e90a9d5eca2).(const ogg_pagecxx . . $ ogg_page# *og); |
| 191 | extern int ogg_page_continuedcxx . . $ ogg_page_continued(2b497e90a9d5eca2).(const ogg_pagecxx . . $ ogg_page# *og); |
| 192 | extern int ogg_page_boscxx . . $ ogg_page_bos(2b497e90a9d5eca2).(const ogg_pagecxx . . $ ogg_page# *og); |
| 193 | extern int ogg_page_eoscxx . . $ ogg_page_eos(2b497e90a9d5eca2).(const ogg_pagecxx . . $ ogg_page# *og); |
| 194 | extern ogg_int64_tcxx . . $ ogg_int64_t# ogg_page_granuleposcxx . . $ ogg_page_granulepos(13b0e8880c30fe07).(const ogg_pagecxx . . $ ogg_page# *og); |
| 195 | extern int ogg_page_serialnocxx . . $ ogg_page_serialno(2b497e90a9d5eca2).(const ogg_pagecxx . . $ ogg_page# *og); |
| 196 | extern long ogg_page_pagenocxx . . $ ogg_page_pageno(13b0e8880c30fe07).(const ogg_pagecxx . . $ ogg_page# *og); |
| 197 | extern int ogg_page_packetscxx . . $ ogg_page_packets(2b497e90a9d5eca2).(const ogg_pagecxx . . $ ogg_page# *og); |
| 198 | |
| 199 | extern void ogg_packet_clearcxx . . $ ogg_packet_clear(d08d6175ad534330).(ogg_packetcxx . . $ ogg_packet# *op); |
| 200 | |
| 201 | |
| 202 | #endif /* _ogg_h_ */ |