1 ! Copyright (C) 2007 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
4 USING: kernel system combinators alien alien.syntax ;
9 { [ os winnt? ] [ "ogg.dll" ] }
10 { [ os macosx? ] [ "libogg.0.dylib" ] }
11 { [ os unix? ] [ "libogg.so" ] }
12 } cond "cdecl" add-library
17 C-STRUCT: oggpack_buffer
22 { "long" "storage" } ;
26 { "long" "header_len" }
28 { "long" "body_len" } ;
30 C-STRUCT: ogg_stream_state
31 { "uchar*" "body_data" }
32 { "long" "body_storage" }
33 { "long" "body_fill" }
34 { "long" "body_returned" }
35 { "int*" "lacing_vals" }
36 { "longlong*" "granule_vals" }
37 { "long" "lacing_storage" }
38 { "long" "lacing_fill" }
39 { "long" "lacing_packet" }
40 { "long" "lacing_returned" }
41 { { "uchar" 282 } "header" }
42 { "int" "header_fill" }
47 { "longlong" "packetno" }
48 { "longlong" "granulepos" } ;
55 { "longlong" "granulepos" }
56 { "longlong" "packetno" } ;
58 C-STRUCT: ogg_sync_state
64 { "int" "headerbytes" }
65 { "int" "bodybytes" } ;
67 FUNCTION: void oggpack_writeinit ( oggpack_buffer* b ) ;
68 FUNCTION: void oggpack_writetrunc ( oggpack_buffer* b, long bits ) ;
69 FUNCTION: void oggpack_writealign ( oggpack_buffer* b) ;
70 FUNCTION: void oggpack_writecopy ( oggpack_buffer* b, void* source, long bits ) ;
71 FUNCTION: void oggpack_reset ( oggpack_buffer* b ) ;
72 FUNCTION: void oggpack_writeclear ( oggpack_buffer* b ) ;
73 FUNCTION: void oggpack_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ;
74 FUNCTION: void oggpack_write ( oggpack_buffer* b, ulong value, int bits ) ;
75 FUNCTION: long oggpack_look ( oggpack_buffer* b, int bits ) ;
76 FUNCTION: long oggpack_look1 ( oggpack_buffer* b ) ;
77 FUNCTION: void oggpack_adv ( oggpack_buffer* b, int bits ) ;
78 FUNCTION: void oggpack_adv1 ( oggpack_buffer* b ) ;
79 FUNCTION: long oggpack_read ( oggpack_buffer* b, int bits ) ;
80 FUNCTION: long oggpack_read1 ( oggpack_buffer* b ) ;
81 FUNCTION: long oggpack_bytes ( oggpack_buffer* b ) ;
82 FUNCTION: long oggpack_bits ( oggpack_buffer* b ) ;
83 FUNCTION: uchar* oggpack_get_buffer ( oggpack_buffer* b ) ;
84 FUNCTION: void oggpackB_writeinit ( oggpack_buffer* b ) ;
85 FUNCTION: void oggpackB_writetrunc ( oggpack_buffer* b, long bits ) ;
86 FUNCTION: void oggpackB_writealign ( oggpack_buffer* b ) ;
87 FUNCTION: void oggpackB_writecopy ( oggpack_buffer* b, void* source, long bits ) ;
88 FUNCTION: void oggpackB_reset ( oggpack_buffer* b ) ;
89 FUNCTION: void oggpackB_writeclear ( oggpack_buffer* b ) ;
90 FUNCTION: void oggpackB_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ;
91 FUNCTION: void oggpackB_write ( oggpack_buffer* b, ulong value, int bits ) ;
92 FUNCTION: long oggpackB_look ( oggpack_buffer* b, int bits ) ;
93 FUNCTION: long oggpackB_look1 ( oggpack_buffer* b ) ;
94 FUNCTION: void oggpackB_adv ( oggpack_buffer* b, int bits ) ;
95 FUNCTION: void oggpackB_adv1 ( oggpack_buffer* b ) ;
96 FUNCTION: long oggpackB_read ( oggpack_buffer* b, int bits ) ;
97 FUNCTION: long oggpackB_read1 ( oggpack_buffer* b ) ;
98 FUNCTION: long oggpackB_bytes ( oggpack_buffer* b ) ;
99 FUNCTION: long oggpackB_bits ( oggpack_buffer* b ) ;
100 FUNCTION: uchar* oggpackB_get_buffer ( oggpack_buffer* b ) ;
101 FUNCTION: int ogg_stream_packetin ( ogg_stream_state* os, ogg_packet* op ) ;
102 FUNCTION: int ogg_stream_pageout ( ogg_stream_state* os, ogg_page* og ) ;
103 FUNCTION: int ogg_stream_flush ( ogg_stream_state* os, ogg_page* og ) ;
104 FUNCTION: int ogg_sync_init ( ogg_sync_state* oy ) ;
105 FUNCTION: int ogg_sync_clear ( ogg_sync_state* oy ) ;
106 FUNCTION: int ogg_sync_reset ( ogg_sync_state* oy ) ;
107 FUNCTION: int ogg_sync_destroy ( ogg_sync_state* oy ) ;
109 FUNCTION: void* ogg_sync_buffer ( ogg_sync_state* oy, long size ) ;
110 FUNCTION: int ogg_sync_wrote ( ogg_sync_state* oy, long bytes ) ;
111 FUNCTION: long ogg_sync_pageseek ( ogg_sync_state* oy, ogg_page* og ) ;
112 FUNCTION: int ogg_sync_pageout ( ogg_sync_state* oy, ogg_page* og ) ;
113 FUNCTION: int ogg_stream_pagein ( ogg_stream_state* os, ogg_page* og ) ;
114 FUNCTION: int ogg_stream_packetout ( ogg_stream_state* os, ogg_packet* op ) ;
115 FUNCTION: int ogg_stream_packetpeek ( ogg_stream_state* os, ogg_packet* op ) ;
116 FUNCTION: int ogg_stream_init (ogg_stream_state* os, int serialno ) ;
117 FUNCTION: int ogg_stream_clear ( ogg_stream_state* os ) ;
118 FUNCTION: int ogg_stream_reset ( ogg_stream_state* os ) ;
119 FUNCTION: int ogg_stream_reset_serialno ( ogg_stream_state* os, int serialno ) ;
120 FUNCTION: int ogg_stream_destroy ( ogg_stream_state* os ) ;
121 FUNCTION: int ogg_stream_eos ( ogg_stream_state* os ) ;
122 FUNCTION: void ogg_page_checksum_set ( ogg_page* og ) ;
123 FUNCTION: int ogg_page_version ( ogg_page* og ) ;
124 FUNCTION: int ogg_page_continued ( ogg_page* og ) ;
125 FUNCTION: int ogg_page_bos ( ogg_page* og ) ;
126 FUNCTION: int ogg_page_eos ( ogg_page* og ) ;
127 FUNCTION: longlong ogg_page_granulepos ( ogg_page* og ) ;
128 FUNCTION: int ogg_page_serialno ( ogg_page* og ) ;
129 FUNCTION: long ogg_page_pageno ( ogg_page* og ) ;
130 FUNCTION: int ogg_page_packets ( ogg_page* og ) ;
131 FUNCTION: void ogg_packet_clear ( ogg_packet* op ) ;