From aef7af66520e331faccb3f73d94e46f2697686b1 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 25 Sep 2009 12:46:46 +1200 Subject: [PATCH 1/6] Fix ogg vocab --- extra/ogg/authors.txt | 1 + extra/ogg/ogg.factor | 141 ++++++++++++++++++++++++++++++++++++++++++ extra/ogg/summary.txt | 1 + extra/ogg/tags.txt | 3 + 4 files changed, 146 insertions(+) create mode 100644 extra/ogg/authors.txt create mode 100644 extra/ogg/ogg.factor create mode 100644 extra/ogg/summary.txt create mode 100644 extra/ogg/tags.txt diff --git a/extra/ogg/authors.txt b/extra/ogg/authors.txt new file mode 100644 index 0000000000..44b06f94bc --- /dev/null +++ b/extra/ogg/authors.txt @@ -0,0 +1 @@ +Chris Double diff --git a/extra/ogg/ogg.factor b/extra/ogg/ogg.factor new file mode 100644 index 0000000000..62c3d1d6e9 --- /dev/null +++ b/extra/ogg/ogg.factor @@ -0,0 +1,141 @@ +! Copyright (C) 2007 Chris Double. +! See http://factorcode.org/license.txt for BSD license. +! +USING: + alien + alien.c-types + alien.libraries + alien.syntax + classes.struct + combinators + kernel + system +; +IN: ogg + +<< +"ogg" { + { [ os winnt? ] [ "ogg.dll" ] } + { [ os macosx? ] [ "libogg.0.dylib" ] } + { [ os unix? ] [ "libogg.so" ] } +} cond "cdecl" add-library +>> + +LIBRARY: ogg + +STRUCT: oggpack_buffer + { endbyte long } + { endbit int } + { buffer uchar* } + { ptr uchar* } + { storage long } ; + +STRUCT: ogg_page + { header uchar* } + { header_len long } + { body uchar* } + { body_len long } ; + +STRUCT: ogg_stream_state + { body_data uchar* } + { body_storage long } + { body_fill long } + { body_returned long } + { lacing_vals int* } + { granule_vals longlong* } + { lacing_storage long } + { lacing_fill long } + { lacing_packet long } + { lacing_returned long } + { header { uchar 282 } } + { header_fill int } + { e_o_s int } + { b_o_s int } + { serialno long } + { pageno long } + { packetno longlong } + { granulepos longlong } ; + +STRUCT: ogg_packet + { packet uchar* } + { bytes long } + { b_o_s long } + { e_o_s long } + { granulepos longlong } + { packetno longlong } ; + +STRUCT: ogg_sync_state + { data uchar* } + { storage int } + { fill int } + { returned int } + { unsynced int } + { headerbytes int } + { bodybytes int } ; + +FUNCTION: void oggpack_writeinit ( oggpack_buffer* b ) ; +FUNCTION: void oggpack_writetrunc ( oggpack_buffer* b, long bits ) ; +FUNCTION: void oggpack_writealign ( oggpack_buffer* b) ; +FUNCTION: void oggpack_writecopy ( oggpack_buffer* b, void* source, long bits ) ; +FUNCTION: void oggpack_reset ( oggpack_buffer* b ) ; +FUNCTION: void oggpack_writeclear ( oggpack_buffer* b ) ; +FUNCTION: void oggpack_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ; +FUNCTION: void oggpack_write ( oggpack_buffer* b, ulong value, int bits ) ; +FUNCTION: long oggpack_look ( oggpack_buffer* b, int bits ) ; +FUNCTION: long oggpack_look1 ( oggpack_buffer* b ) ; +FUNCTION: void oggpack_adv ( oggpack_buffer* b, int bits ) ; +FUNCTION: void oggpack_adv1 ( oggpack_buffer* b ) ; +FUNCTION: long oggpack_read ( oggpack_buffer* b, int bits ) ; +FUNCTION: long oggpack_read1 ( oggpack_buffer* b ) ; +FUNCTION: long oggpack_bytes ( oggpack_buffer* b ) ; +FUNCTION: long oggpack_bits ( oggpack_buffer* b ) ; +FUNCTION: uchar* oggpack_get_buffer ( oggpack_buffer* b ) ; +FUNCTION: void oggpackB_writeinit ( oggpack_buffer* b ) ; +FUNCTION: void oggpackB_writetrunc ( oggpack_buffer* b, long bits ) ; +FUNCTION: void oggpackB_writealign ( oggpack_buffer* b ) ; +FUNCTION: void oggpackB_writecopy ( oggpack_buffer* b, void* source, long bits ) ; +FUNCTION: void oggpackB_reset ( oggpack_buffer* b ) ; +FUNCTION: void oggpackB_writeclear ( oggpack_buffer* b ) ; +FUNCTION: void oggpackB_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ; +FUNCTION: void oggpackB_write ( oggpack_buffer* b, ulong value, int bits ) ; +FUNCTION: long oggpackB_look ( oggpack_buffer* b, int bits ) ; +FUNCTION: long oggpackB_look1 ( oggpack_buffer* b ) ; +FUNCTION: void oggpackB_adv ( oggpack_buffer* b, int bits ) ; +FUNCTION: void oggpackB_adv1 ( oggpack_buffer* b ) ; +FUNCTION: long oggpackB_read ( oggpack_buffer* b, int bits ) ; +FUNCTION: long oggpackB_read1 ( oggpack_buffer* b ) ; +FUNCTION: long oggpackB_bytes ( oggpack_buffer* b ) ; +FUNCTION: long oggpackB_bits ( oggpack_buffer* b ) ; +FUNCTION: uchar* oggpackB_get_buffer ( oggpack_buffer* b ) ; +FUNCTION: int ogg_stream_packetin ( ogg_stream_state* os, ogg_packet* op ) ; +FUNCTION: int ogg_stream_pageout ( ogg_stream_state* os, ogg_page* og ) ; +FUNCTION: int ogg_stream_flush ( ogg_stream_state* os, ogg_page* og ) ; +FUNCTION: int ogg_sync_init ( ogg_sync_state* oy ) ; +FUNCTION: int ogg_sync_clear ( ogg_sync_state* oy ) ; +FUNCTION: int ogg_sync_reset ( ogg_sync_state* oy ) ; +FUNCTION: int ogg_sync_destroy ( ogg_sync_state* oy ) ; + +FUNCTION: void* ogg_sync_buffer ( ogg_sync_state* oy, long size ) ; +FUNCTION: int ogg_sync_wrote ( ogg_sync_state* oy, long bytes ) ; +FUNCTION: long ogg_sync_pageseek ( ogg_sync_state* oy, ogg_page* og ) ; +FUNCTION: int ogg_sync_pageout ( ogg_sync_state* oy, ogg_page* og ) ; +FUNCTION: int ogg_stream_pagein ( ogg_stream_state* os, ogg_page* og ) ; +FUNCTION: int ogg_stream_packetout ( ogg_stream_state* os, ogg_packet* op ) ; +FUNCTION: int ogg_stream_packetpeek ( ogg_stream_state* os, ogg_packet* op ) ; +FUNCTION: int ogg_stream_init (ogg_stream_state* os, int serialno ) ; +FUNCTION: int ogg_stream_clear ( ogg_stream_state* os ) ; +FUNCTION: int ogg_stream_reset ( ogg_stream_state* os ) ; +FUNCTION: int ogg_stream_reset_serialno ( ogg_stream_state* os, int serialno ) ; +FUNCTION: int ogg_stream_destroy ( ogg_stream_state* os ) ; +FUNCTION: int ogg_stream_eos ( ogg_stream_state* os ) ; +FUNCTION: void ogg_page_checksum_set ( ogg_page* og ) ; +FUNCTION: int ogg_page_version ( ogg_page* og ) ; +FUNCTION: int ogg_page_continued ( ogg_page* og ) ; +FUNCTION: int ogg_page_bos ( ogg_page* og ) ; +FUNCTION: int ogg_page_eos ( ogg_page* og ) ; +FUNCTION: longlong ogg_page_granulepos ( ogg_page* og ) ; +FUNCTION: int ogg_page_serialno ( ogg_page* og ) ; +FUNCTION: long ogg_page_pageno ( ogg_page* og ) ; +FUNCTION: int ogg_page_packets ( ogg_page* og ) ; +FUNCTION: void ogg_packet_clear ( ogg_packet* op ) ; + diff --git a/extra/ogg/summary.txt b/extra/ogg/summary.txt new file mode 100644 index 0000000000..3d2b5511c9 --- /dev/null +++ b/extra/ogg/summary.txt @@ -0,0 +1 @@ +Ogg media library binding diff --git a/extra/ogg/tags.txt b/extra/ogg/tags.txt new file mode 100644 index 0000000000..be30e2cdd4 --- /dev/null +++ b/extra/ogg/tags.txt @@ -0,0 +1,3 @@ +bindings +audio +video From 55c66b16e18d486c35f1e5d5f82a9f2735787968 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 25 Sep 2009 13:23:53 +1200 Subject: [PATCH 2/6] Fix ogg.vorbis vocab --- extra/ogg/vorbis/authors.txt | 1 + extra/ogg/vorbis/summary.txt | 1 + extra/ogg/vorbis/tags.txt | 1 + extra/ogg/vorbis/vorbis.factor | 151 +++++++++++++++++++++++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 extra/ogg/vorbis/authors.txt create mode 100644 extra/ogg/vorbis/summary.txt create mode 100644 extra/ogg/vorbis/tags.txt create mode 100644 extra/ogg/vorbis/vorbis.factor diff --git a/extra/ogg/vorbis/authors.txt b/extra/ogg/vorbis/authors.txt new file mode 100644 index 0000000000..44b06f94bc --- /dev/null +++ b/extra/ogg/vorbis/authors.txt @@ -0,0 +1 @@ +Chris Double diff --git a/extra/ogg/vorbis/summary.txt b/extra/ogg/vorbis/summary.txt new file mode 100644 index 0000000000..1a8118ffe2 --- /dev/null +++ b/extra/ogg/vorbis/summary.txt @@ -0,0 +1 @@ +Ogg Vorbis audio library binding diff --git a/extra/ogg/vorbis/tags.txt b/extra/ogg/vorbis/tags.txt new file mode 100644 index 0000000000..d5cc28426a --- /dev/null +++ b/extra/ogg/vorbis/tags.txt @@ -0,0 +1 @@ +audio diff --git a/extra/ogg/vorbis/vorbis.factor b/extra/ogg/vorbis/vorbis.factor new file mode 100644 index 0000000000..e11f309c91 --- /dev/null +++ b/extra/ogg/vorbis/vorbis.factor @@ -0,0 +1,151 @@ +! Copyright (C) 2007 Chris Double. +! See http://factorcode.org/license.txt for BSD license. +! +USING: + alien + alien.c-types + alien.libraries + alien.syntax + classes.struct + combinators + kernel + ogg + system +; +IN: ogg.vorbis + +<< +"vorbis" { + { [ os winnt? ] [ "vorbis.dll" ] } + { [ os macosx? ] [ "libvorbis.0.dylib" ] } + { [ os unix? ] [ "libvorbis.so" ] } +} cond "cdecl" add-library +>> + +LIBRARY: vorbis + +STRUCT: vorbis_info + { version int } + { channels int } + { rate long } + { bitrate_upper long } + { bitrate_nominal long } + { bitrate_lower long } + { bitrate_window long } + { codec_setup void* } + ; + +STRUCT: vorbis_dsp_state + { analysisp int } + { vi vorbis_info* } + { pcm float** } + { pcmret float** } + { pcm_storage int } + { pcm_current int } + { pcm_returned int } + { preextrapolate int } + { eofflag int } + { lW long } + { W long } + { nW long } + { centerW long } + { granulepos longlong } + { sequence longlong } + { glue_bits longlong } + { time_bits longlong } + { floor_bits longlong } + { res_bits longlong } + { backend_state void* } + ; + +STRUCT: alloc_chain + { ptr void* } + { next void* } + ; + +STRUCT: vorbis_block + { pcm float** } + { opb oggpack_buffer } + { lW long } + { W long } + { nW long } + { pcmend int } + { mode int } + { eofflag int } + { granulepos longlong } + { sequence longlong } + { vd vorbis_dsp_state* } + { localstore void* } + { localtop long } + { localalloc long } + { totaluse long } + { reap alloc_chain* } + { glue_bits long } + { time_bits long } + { floor_bits long } + { res_bits long } + { internal void* } + ; + +STRUCT: vorbis_comment + { usercomments char** } + { comment_lengths int* } + { comments int } + { vendor char* } + ; + +FUNCTION: void vorbis_info_init ( vorbis_info* vi ) ; +FUNCTION: void vorbis_info_clear ( vorbis_info* vi ) ; +FUNCTION: int vorbis_info_blocksize ( vorbis_info* vi, int zo ) ; +FUNCTION: void vorbis_comment_init ( vorbis_comment* vc ) ; +FUNCTION: void vorbis_comment_add ( vorbis_comment* vc, char* comment ) ; +FUNCTION: void vorbis_comment_add_tag ( vorbis_comment* vc, char* tag, char* contents ) ; +FUNCTION: char* vorbis_comment_query ( vorbis_comment* vc, char* tag, int count ) ; +FUNCTION: int vorbis_comment_query_count ( vorbis_comment* vc, char* tag ) ; +FUNCTION: void vorbis_comment_clear ( vorbis_comment* vc ) ; +FUNCTION: int vorbis_block_init ( vorbis_dsp_state* v, vorbis_block* vb ) ; +FUNCTION: int vorbis_block_clear ( vorbis_block* vb ) ; +FUNCTION: void vorbis_dsp_clear ( vorbis_dsp_state* v ) ; +FUNCTION: double vorbis_granule_time ( vorbis_dsp_state* v, longlong granulepos ) ; +FUNCTION: int vorbis_analysis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ; +FUNCTION: int vorbis_commentheader_out ( vorbis_comment* vc, ogg_packet* op ) ; +FUNCTION: int vorbis_analysis_headerout ( vorbis_dsp_state* v, + vorbis_comment* vc, + ogg_packet* op, + ogg_packet* op_comm, + ogg_packet* op_code ) ; +FUNCTION: float** vorbis_analysis_buffer ( vorbis_dsp_state* v, int vals ) ; +FUNCTION: int vorbis_analysis_wrote ( vorbis_dsp_state* v, int vals ) ; +FUNCTION: int vorbis_analysis_blockout ( vorbis_dsp_state* v, vorbis_block* vb ) ; +FUNCTION: int vorbis_analysis ( vorbis_block* vb, ogg_packet* op ) ; +FUNCTION: int vorbis_bitrate_addblock ( vorbis_block* vb ) ; +FUNCTION: int vorbis_bitrate_flushpacket ( vorbis_dsp_state* vd, + ogg_packet* op ) ; +FUNCTION: int vorbis_synthesis_headerin ( vorbis_info* vi, vorbis_comment* vc, + ogg_packet* op ) ; +FUNCTION: int vorbis_synthesis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ; +FUNCTION: int vorbis_synthesis_restart ( vorbis_dsp_state* v ) ; +FUNCTION: int vorbis_synthesis ( vorbis_block* vb, ogg_packet* op ) ; +FUNCTION: int vorbis_synthesis_trackonly ( vorbis_block* vb, ogg_packet* op ) ; +FUNCTION: int vorbis_synthesis_blockin ( vorbis_dsp_state* v, vorbis_block* vb ) ; +FUNCTION: int vorbis_synthesis_pcmout ( vorbis_dsp_state* v, float*** pcm ) ; +FUNCTION: int vorbis_synthesis_lapout ( vorbis_dsp_state* v, float*** pcm ) ; +FUNCTION: int vorbis_synthesis_read ( vorbis_dsp_state* v, int samples ) ; +FUNCTION: long vorbis_packet_blocksize ( vorbis_info* vi, ogg_packet* op ) ; +FUNCTION: int vorbis_synthesis_halfrate ( vorbis_info* v, int flag ) ; +FUNCTION: int vorbis_synthesis_halfrate_p ( vorbis_info* v ) ; + +: OV_FALSE ( -- number ) -1 ; inline +: OV_EOF ( -- number ) -2 ; inline +: OV_HOLE ( -- number ) -3 ; inline +: OV_EREAD ( -- number ) -128 ; inline +: OV_EFAULT ( -- number ) -129 ; inline +: OV_EIMPL ( -- number ) -130 ; inline +: OV_EINVAL ( -- number ) -131 ; inline +: OV_ENOTVORBIS ( -- number ) -132 ; inline +: OV_EBADHEADER ( -- number ) -133 ; inline +: OV_EVERSION ( -- number ) -134 ; inline +: OV_ENOTAUDIO ( -- number ) -135 ; inline +: OV_EBADPACKET ( -- number ) -136 ; inline +: OV_EBADLINK ( -- number ) -137 ; inline +: OV_ENOSEEK ( -- number ) -138 ; inline From 02f173bd15dad214f306bba103c4be8dee8beec6 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 25 Sep 2009 15:46:11 +1200 Subject: [PATCH 3/6] Fix ogg.theora vocab --- extra/ogg/theora/authors.txt | 1 + extra/ogg/theora/summary.txt | 1 + extra/ogg/theora/tags.txt | 1 + extra/ogg/theora/theora.factor | 174 +++++++++++++++++++++++++++++++++ 4 files changed, 177 insertions(+) create mode 100644 extra/ogg/theora/authors.txt create mode 100644 extra/ogg/theora/summary.txt create mode 100644 extra/ogg/theora/tags.txt create mode 100644 extra/ogg/theora/theora.factor diff --git a/extra/ogg/theora/authors.txt b/extra/ogg/theora/authors.txt new file mode 100644 index 0000000000..44b06f94bc --- /dev/null +++ b/extra/ogg/theora/authors.txt @@ -0,0 +1 @@ +Chris Double diff --git a/extra/ogg/theora/summary.txt b/extra/ogg/theora/summary.txt new file mode 100644 index 0000000000..aa5ec1fdf7 --- /dev/null +++ b/extra/ogg/theora/summary.txt @@ -0,0 +1 @@ +Ogg Theora video library binding diff --git a/extra/ogg/theora/tags.txt b/extra/ogg/theora/tags.txt new file mode 100644 index 0000000000..2b68b5238a --- /dev/null +++ b/extra/ogg/theora/tags.txt @@ -0,0 +1 @@ +video diff --git a/extra/ogg/theora/theora.factor b/extra/ogg/theora/theora.factor new file mode 100644 index 0000000000..ad5c0c512e --- /dev/null +++ b/extra/ogg/theora/theora.factor @@ -0,0 +1,174 @@ +! Copyright (C) 2007 Chris Double. +! See http://factorcode.org/license.txt for BSD license. +! +USING: + alien + alien.c-types + alien.libraries + alien.syntax + classes.struct + combinators + kernel + ogg + system +; +IN: ogg.theora + +<< +"theora" { + { [ os winnt? ] [ "theora.dll" ] } + { [ os macosx? ] [ "libtheora.0.dylib" ] } + { [ os unix? ] [ "libtheora.so" ] } +} cond "cdecl" add-library +>> + +LIBRARY: theora + +CONSTANT: TH-EFAULT -1 +CONSTANT: TH-EINVAL -10 +CONSTANT: TH-EBADHEADER -20 +CONSTANT: TH-ENOTFORMAT -21 +CONSTANT: TH-EVERSION -22 +CONSTANT: TH-EIMPL -23 +CONSTANT: TH-EBADPACKET -24 +CONSTANT: TH-DUPFRAME 1 + +TYPEDEF: int th-colorspace +CONSTANT: TH-CS-UNSPECIFIED 0 +CONSTANT: TH-CS-ITU-REC-470M 1 +CONSTANT: TH-CS-ITU-REC-470BG 2 +CONSTANT: TH-CS-NSPACES 3 + +TYPEDEF: int th-pixelformat +CONSTANT: TH-PF-RSVD 0 +CONSTANT: TH-PF-422 1 +CONSTANT: TH-PF-444 2 +CONSTANT: TH-PF-NFORMATS 3 + +STRUCT: th-img-plane + { width int } + { height int } + { stride int } + { data uchar* } +; + +TYPEDEF: th-img-plane[3] th-ycbcr-buffer + +STRUCT: th-info + { version-major uchar } + { version-minor uchar } + { version-subminor uchar } + { frame-width uint } + { frame-height uint } + { pic-width uint } + { pic-height uint } + { pic-x uint } + { pic-y uint } + { fps-numerator uint } + { fps-denominator uint } + { aspect-numerator uint } + { aspect-denominator uint } + { colorspace th-colorspace } + { pixel-fmt th-pixelformat } + { target-bitrate int } + { quality int } + { keyframe-granule-shift int } +; + +STRUCT: th-comment + { user-comments char** } + { comment-lengths int* } + { comments int } + { vendor char* } +; + +TYPEDEF: uchar[64] th-quant-base + +STRUCT: th-quant-ranges + { nranges int } + { sizes int* } + { base-matrices th-quant-base* } +; + +STRUCT: th-quant-info + { dc-scale { short 64 } } + { ac-scale { short 64 } } + { loop-filter-limits { uchar 64 } } + { qi-ranges { th-quant-ranges 2 3 } } +; + +CONSTANT: TH-NHUFFMANE-TABLES 80 +CONSTANT: TH-NDCT-TOKENS 32 + +STRUCT: th-huff-code + { pattern int } + { nbits int } +; + +FUNCTION: char* th_version_string ( ) ; +FUNCTION: uint th_version_number ( ) ; +FUNCTION: longlong th_granule_frame ( void* encdec, longlong granpos) ; +FUNCTION: int th_packet_isheader ( ogg-packet* op ) ; +FUNCTION: int th_packet_iskeyframe ( ogg-packet* op ) ; +FUNCTION: void th_info_init ( th-info* info ) ; +FUNCTION: void th_info_clear ( th-info* info ) ; +FUNCTION: void th_comment_init ( th-comment* tc ) ; +FUNCTION: void th_comment_add ( th-comment* tc, char* comment ) ; +FUNCTION: void th_comment_add_tag ( th-comment* tc, char* tag, char* value ) ; +FUNCTION: char* th_comment_query ( th-comment* tc, char* tag, int count ) ; +FUNCTION: int th_comment_query_count ( th-comment* tc, char* tag ) ; +FUNCTION: void th_comment_clear ( th-comment* tc ) ; + +CONSTANT: TH-ENCCTL-SET-HUFFMAN-CODES 0 +CONSTANT: TH-ENCCTL-SET-QUANT-PARAMS 2 +CONSTANT: TH-ENCCTL-SET-KEYFRAME-FREQUENCY-FORCE 4 +CONSTANT: TH-ENCCTL-SET-VP3-COMPATIBLE 10 +CONSTANT: TH-ENCCTL-GET-SPLEVEL-MAX 12 +CONSTANT: TH-ENCCTL-SET-SPLEVEL 14 +CONSTANT: TH-ENCCTL-SET-DUP-COUNT 18 +CONSTANT: TH-ENCCTL-SET-RATE-FLAGS 20 +CONSTANT: TH-ENCCTL-SET-RATE-BUFFER 22 +CONSTANT: TH-ENCCTL-2PASS-OUT 24 +CONSTANT: TH-ENCCTL-2PASS-IN 26 +CONSTANT: TH-ENCCTL-SET-QUALITY 28 +CONSTANT: TH-ENCCTL-SET-BITRATE 30 + +CONSTANT: TH-RATECTL-DROP-FRAMES 1 +CONSTANT: TH-RATECTL-CAP-OVERFLOW 2 +CONSTANT: TH-RATECTL-CAP-UNDERFOW 4 + +TYPEDEF: void* th-enc-ctx + +FUNCTION: th-enc-ctx* th_encode_alloc ( th-info* info ) ; +FUNCTION: int th_encode_ctl ( th-enc-ctx* enc, int req, void* buf, int buf_sz ) ; +FUNCTION: int th_encode_flushheader ( th-enc-ctx* enc, th-comment* comments, ogg-packet* op ) ; +FUNCTION: int th_encode_ycbcr_in ( th-enc-ctx* enc, th-ycbcr-buffer ycbcr ) ; +FUNCTION: int th_encode_packetout ( th-enc-ctx* enc, int last, ogg-packet* op ) ; +FUNCTION: void th_encode_free ( th-enc-ctx* enc ) ; + +CONSTANT: TH-DECCTL-GET-PPLEVEL-MAX 1 +CONSTANT: TH-DECCTL-SET-PPLEVEL 3 +CONSTANT: TH-DECCTL-SET-GRANPOS 5 +CONSTANT: TH-DECCTL-SET-STRIPE-CB 7 +CONSTANT: TH-DECCTL-SET-TELEMETRY-MBMODE 9 +CONSTANT: TH-DECCTL-SET-TELEMETRY-MV 11 +CONSTANT: TH-DECCTL-SET-TELEMETRY-QI 13 +CONSTANT: TH-DECCTL-SET-TELEMETRY-BITS 15 + +TYPEDEF: void* th-stripe-decoded-func + +STRUCT: th-stripe-callback + { ctx void* } + { stripe-decoded th-stripe-decoded-func } +; + +TYPEDEF: void* th-dec-ctx +TYPEDEF: void* th-setup-info + +FUNCTION: int th_decode_headerin ( th-info* info, th-comment* tc, th-setup-info** setup, ogg-packet* op ) ; +FUNCTION: th-dec-ctx* th_decode_alloc ( th-info* info, th-setup-info* setup ) ; +FUNCTION: void th_setup_free ( th-setup-info* setup ) ; +FUNCTION: int th_decode_ctl ( th-dec-ctx* dec, int req, void* buf, int buf_sz ) ; +FUNCTION: int th_decode_packetin ( th-dec-ctx* dec, ogg-packet* op, longlong granpos ) ; +FUNCTION: int th_decode_ycbcr_out ( th-dec-ctx* dec, th-ycbcr-buffer ycbcr ) ; +FUNCTION: void th_decode_free ( th-dec-ctx* dec ) ; From b61f11a72763c41448f8be69e84887a98f894b49 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 25 Sep 2009 15:53:32 +1200 Subject: [PATCH 4/6] Tidy up struct names for ogg vocabs --- extra/ogg/ogg.factor | 138 ++++++++++++++++----------------- extra/ogg/vorbis/vorbis.factor | 126 +++++++++++++++--------------- 2 files changed, 132 insertions(+), 132 deletions(-) diff --git a/extra/ogg/ogg.factor b/extra/ogg/ogg.factor index 62c3d1d6e9..6cd6964721 100644 --- a/extra/ogg/ogg.factor +++ b/extra/ogg/ogg.factor @@ -23,20 +23,20 @@ IN: ogg LIBRARY: ogg -STRUCT: oggpack_buffer +STRUCT: oggpack-buffer { endbyte long } { endbit int } { buffer uchar* } { ptr uchar* } { storage long } ; -STRUCT: ogg_page +STRUCT: ogg-page { header uchar* } { header_len long } { body uchar* } { body_len long } ; -STRUCT: ogg_stream_state +STRUCT: ogg-stream-state { body_data uchar* } { body_storage long } { body_fill long } @@ -56,7 +56,7 @@ STRUCT: ogg_stream_state { packetno longlong } { granulepos longlong } ; -STRUCT: ogg_packet +STRUCT: ogg-packet { packet uchar* } { bytes long } { b_o_s long } @@ -64,7 +64,7 @@ STRUCT: ogg_packet { granulepos longlong } { packetno longlong } ; -STRUCT: ogg_sync_state +STRUCT: ogg-sync-state { data uchar* } { storage int } { fill int } @@ -73,69 +73,69 @@ STRUCT: ogg_sync_state { headerbytes int } { bodybytes int } ; -FUNCTION: void oggpack_writeinit ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_writetrunc ( oggpack_buffer* b, long bits ) ; -FUNCTION: void oggpack_writealign ( oggpack_buffer* b) ; -FUNCTION: void oggpack_writecopy ( oggpack_buffer* b, void* source, long bits ) ; -FUNCTION: void oggpack_reset ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_writeclear ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ; -FUNCTION: void oggpack_write ( oggpack_buffer* b, ulong value, int bits ) ; -FUNCTION: long oggpack_look ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpack_look1 ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_adv ( oggpack_buffer* b, int bits ) ; -FUNCTION: void oggpack_adv1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpack_read ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpack_read1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpack_bytes ( oggpack_buffer* b ) ; -FUNCTION: long oggpack_bits ( oggpack_buffer* b ) ; -FUNCTION: uchar* oggpack_get_buffer ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writeinit ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writetrunc ( oggpack_buffer* b, long bits ) ; -FUNCTION: void oggpackB_writealign ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writecopy ( oggpack_buffer* b, void* source, long bits ) ; -FUNCTION: void oggpackB_reset ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writeclear ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ; -FUNCTION: void oggpackB_write ( oggpack_buffer* b, ulong value, int bits ) ; -FUNCTION: long oggpackB_look ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpackB_look1 ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_adv ( oggpack_buffer* b, int bits ) ; -FUNCTION: void oggpackB_adv1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpackB_read ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpackB_read1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpackB_bytes ( oggpack_buffer* b ) ; -FUNCTION: long oggpackB_bits ( oggpack_buffer* b ) ; -FUNCTION: uchar* oggpackB_get_buffer ( oggpack_buffer* b ) ; -FUNCTION: int ogg_stream_packetin ( ogg_stream_state* os, ogg_packet* op ) ; -FUNCTION: int ogg_stream_pageout ( ogg_stream_state* os, ogg_page* og ) ; -FUNCTION: int ogg_stream_flush ( ogg_stream_state* os, ogg_page* og ) ; -FUNCTION: int ogg_sync_init ( ogg_sync_state* oy ) ; -FUNCTION: int ogg_sync_clear ( ogg_sync_state* oy ) ; -FUNCTION: int ogg_sync_reset ( ogg_sync_state* oy ) ; -FUNCTION: int ogg_sync_destroy ( ogg_sync_state* oy ) ; +FUNCTION: void oggpack_writeinit ( oggpack-buffer* b ) ; +FUNCTION: void oggpack_writetrunc ( oggpack-buffer* b, long bits ) ; +FUNCTION: void oggpack_writealign ( oggpack-buffer* b) ; +FUNCTION: void oggpack_writecopy ( oggpack-buffer* b, void* source, long bits ) ; +FUNCTION: void oggpack_reset ( oggpack-buffer* b ) ; +FUNCTION: void oggpack_writeclear ( oggpack-buffer* b ) ; +FUNCTION: void oggpack_readinit ( oggpack-buffer* b, uchar* buf, int bytes ) ; +FUNCTION: void oggpack_write ( oggpack-buffer* b, ulong value, int bits ) ; +FUNCTION: long oggpack_look ( oggpack-buffer* b, int bits ) ; +FUNCTION: long oggpack_look1 ( oggpack-buffer* b ) ; +FUNCTION: void oggpack_adv ( oggpack-buffer* b, int bits ) ; +FUNCTION: void oggpack_adv1 ( oggpack-buffer* b ) ; +FUNCTION: long oggpack_read ( oggpack-buffer* b, int bits ) ; +FUNCTION: long oggpack_read1 ( oggpack-buffer* b ) ; +FUNCTION: long oggpack_bytes ( oggpack-buffer* b ) ; +FUNCTION: long oggpack_bits ( oggpack-buffer* b ) ; +FUNCTION: uchar* oggpack_get_buffer ( oggpack-buffer* b ) ; +FUNCTION: void oggpackB_writeinit ( oggpack-buffer* b ) ; +FUNCTION: void oggpackB_writetrunc ( oggpack-buffer* b, long bits ) ; +FUNCTION: void oggpackB_writealign ( oggpack-buffer* b ) ; +FUNCTION: void oggpackB_writecopy ( oggpack-buffer* b, void* source, long bits ) ; +FUNCTION: void oggpackB_reset ( oggpack-buffer* b ) ; +FUNCTION: void oggpackB_writeclear ( oggpack-buffer* b ) ; +FUNCTION: void oggpackB_readinit ( oggpack-buffer* b, uchar* buf, int bytes ) ; +FUNCTION: void oggpackB_write ( oggpack-buffer* b, ulong value, int bits ) ; +FUNCTION: long oggpackB_look ( oggpack-buffer* b, int bits ) ; +FUNCTION: long oggpackB_look1 ( oggpack-buffer* b ) ; +FUNCTION: void oggpackB_adv ( oggpack-buffer* b, int bits ) ; +FUNCTION: void oggpackB_adv1 ( oggpack-buffer* b ) ; +FUNCTION: long oggpackB_read ( oggpack-buffer* b, int bits ) ; +FUNCTION: long oggpackB_read1 ( oggpack-buffer* b ) ; +FUNCTION: long oggpackB_bytes ( oggpack-buffer* b ) ; +FUNCTION: long oggpackB_bits ( oggpack-buffer* b ) ; +FUNCTION: uchar* oggpackB_get_buffer ( oggpack-buffer* b ) ; +FUNCTION: int ogg_stream_packetin ( ogg-stream-state* os, ogg-packet* op ) ; +FUNCTION: int ogg_stream_pageout ( ogg-stream-state* os, ogg-page* og ) ; +FUNCTION: int ogg_stream_flush ( ogg-stream-state* os, ogg-page* og ) ; +FUNCTION: int ogg_sync_init ( ogg-sync-state* oy ) ; +FUNCTION: int ogg_sync_clear ( ogg-sync-state* oy ) ; +FUNCTION: int ogg_sync_reset ( ogg-sync-state* oy ) ; +FUNCTION: int ogg_sync_destroy ( ogg-sync-state* oy ) ; -FUNCTION: void* ogg_sync_buffer ( ogg_sync_state* oy, long size ) ; -FUNCTION: int ogg_sync_wrote ( ogg_sync_state* oy, long bytes ) ; -FUNCTION: long ogg_sync_pageseek ( ogg_sync_state* oy, ogg_page* og ) ; -FUNCTION: int ogg_sync_pageout ( ogg_sync_state* oy, ogg_page* og ) ; -FUNCTION: int ogg_stream_pagein ( ogg_stream_state* os, ogg_page* og ) ; -FUNCTION: int ogg_stream_packetout ( ogg_stream_state* os, ogg_packet* op ) ; -FUNCTION: int ogg_stream_packetpeek ( ogg_stream_state* os, ogg_packet* op ) ; -FUNCTION: int ogg_stream_init (ogg_stream_state* os, int serialno ) ; -FUNCTION: int ogg_stream_clear ( ogg_stream_state* os ) ; -FUNCTION: int ogg_stream_reset ( ogg_stream_state* os ) ; -FUNCTION: int ogg_stream_reset_serialno ( ogg_stream_state* os, int serialno ) ; -FUNCTION: int ogg_stream_destroy ( ogg_stream_state* os ) ; -FUNCTION: int ogg_stream_eos ( ogg_stream_state* os ) ; -FUNCTION: void ogg_page_checksum_set ( ogg_page* og ) ; -FUNCTION: int ogg_page_version ( ogg_page* og ) ; -FUNCTION: int ogg_page_continued ( ogg_page* og ) ; -FUNCTION: int ogg_page_bos ( ogg_page* og ) ; -FUNCTION: int ogg_page_eos ( ogg_page* og ) ; -FUNCTION: longlong ogg_page_granulepos ( ogg_page* og ) ; -FUNCTION: int ogg_page_serialno ( ogg_page* og ) ; -FUNCTION: long ogg_page_pageno ( ogg_page* og ) ; -FUNCTION: int ogg_page_packets ( ogg_page* og ) ; -FUNCTION: void ogg_packet_clear ( ogg_packet* op ) ; +FUNCTION: void* ogg_sync_buffer ( ogg-sync-state* oy, long size ) ; +FUNCTION: int ogg_sync_wrote ( ogg-sync-state* oy, long bytes ) ; +FUNCTION: long ogg_sync_pageseek ( ogg-sync-state* oy, ogg-page* og ) ; +FUNCTION: int ogg_sync_pageout ( ogg-sync-state* oy, ogg-page* og ) ; +FUNCTION: int ogg_stream_pagein ( ogg-stream-state* os, ogg-page* og ) ; +FUNCTION: int ogg_stream_packetout ( ogg-stream-state* os, ogg-packet* op ) ; +FUNCTION: int ogg_stream_packetpeek ( ogg-stream-state* os, ogg-packet* op ) ; +FUNCTION: int ogg_stream_init (ogg-stream-state* os, int serialno ) ; +FUNCTION: int ogg_stream_clear ( ogg-stream-state* os ) ; +FUNCTION: int ogg_stream_reset ( ogg-stream-state* os ) ; +FUNCTION: int ogg_stream_reset_serialno ( ogg-stream-state* os, int serialno ) ; +FUNCTION: int ogg_stream_destroy ( ogg-stream-state* os ) ; +FUNCTION: int ogg_stream_eos ( ogg-stream-state* os ) ; +FUNCTION: void ogg_page_checksum_set ( ogg-page* og ) ; +FUNCTION: int ogg_page_version ( ogg-page* og ) ; +FUNCTION: int ogg_page_continued ( ogg-page* og ) ; +FUNCTION: int ogg_page_bos ( ogg-page* og ) ; +FUNCTION: int ogg_page_eos ( ogg-page* og ) ; +FUNCTION: longlong ogg_page_granulepos ( ogg-page* og ) ; +FUNCTION: int ogg_page_serialno ( ogg-page* og ) ; +FUNCTION: long ogg_page_pageno ( ogg-page* og ) ; +FUNCTION: int ogg_page_packets ( ogg-page* og ) ; +FUNCTION: void ogg_packet_clear ( ogg-packet* op ) ; diff --git a/extra/ogg/vorbis/vorbis.factor b/extra/ogg/vorbis/vorbis.factor index e11f309c91..8cf79fecaf 100644 --- a/extra/ogg/vorbis/vorbis.factor +++ b/extra/ogg/vorbis/vorbis.factor @@ -24,7 +24,7 @@ IN: ogg.vorbis LIBRARY: vorbis -STRUCT: vorbis_info +STRUCT: vorbis-info { version int } { channels int } { rate long } @@ -35,9 +35,9 @@ STRUCT: vorbis_info { codec_setup void* } ; -STRUCT: vorbis_dsp_state +STRUCT: vorbis-dsp-state { analysisp int } - { vi vorbis_info* } + { vi vorbis-info* } { pcm float** } { pcmret float** } { pcm_storage int } @@ -58,14 +58,14 @@ STRUCT: vorbis_dsp_state { backend_state void* } ; -STRUCT: alloc_chain +STRUCT: alloc-chain { ptr void* } { next void* } ; -STRUCT: vorbis_block +STRUCT: vorbis-block { pcm float** } - { opb oggpack_buffer } + { opb oggpack-buffer } { lW long } { W long } { nW long } @@ -74,12 +74,12 @@ STRUCT: vorbis_block { eofflag int } { granulepos longlong } { sequence longlong } - { vd vorbis_dsp_state* } + { vd vorbis-dsp-state* } { localstore void* } { localtop long } { localalloc long } { totaluse long } - { reap alloc_chain* } + { reap alloc-chain* } { glue_bits long } { time_bits long } { floor_bits long } @@ -87,65 +87,65 @@ STRUCT: vorbis_block { internal void* } ; -STRUCT: vorbis_comment +STRUCT: vorbis-comment { usercomments char** } { comment_lengths int* } { comments int } { vendor char* } ; -FUNCTION: void vorbis_info_init ( vorbis_info* vi ) ; -FUNCTION: void vorbis_info_clear ( vorbis_info* vi ) ; -FUNCTION: int vorbis_info_blocksize ( vorbis_info* vi, int zo ) ; -FUNCTION: void vorbis_comment_init ( vorbis_comment* vc ) ; -FUNCTION: void vorbis_comment_add ( vorbis_comment* vc, char* comment ) ; -FUNCTION: void vorbis_comment_add_tag ( vorbis_comment* vc, char* tag, char* contents ) ; -FUNCTION: char* vorbis_comment_query ( vorbis_comment* vc, char* tag, int count ) ; -FUNCTION: int vorbis_comment_query_count ( vorbis_comment* vc, char* tag ) ; -FUNCTION: void vorbis_comment_clear ( vorbis_comment* vc ) ; -FUNCTION: int vorbis_block_init ( vorbis_dsp_state* v, vorbis_block* vb ) ; -FUNCTION: int vorbis_block_clear ( vorbis_block* vb ) ; -FUNCTION: void vorbis_dsp_clear ( vorbis_dsp_state* v ) ; -FUNCTION: double vorbis_granule_time ( vorbis_dsp_state* v, longlong granulepos ) ; -FUNCTION: int vorbis_analysis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ; -FUNCTION: int vorbis_commentheader_out ( vorbis_comment* vc, ogg_packet* op ) ; -FUNCTION: int vorbis_analysis_headerout ( vorbis_dsp_state* v, - vorbis_comment* vc, - ogg_packet* op, - ogg_packet* op_comm, - ogg_packet* op_code ) ; -FUNCTION: float** vorbis_analysis_buffer ( vorbis_dsp_state* v, int vals ) ; -FUNCTION: int vorbis_analysis_wrote ( vorbis_dsp_state* v, int vals ) ; -FUNCTION: int vorbis_analysis_blockout ( vorbis_dsp_state* v, vorbis_block* vb ) ; -FUNCTION: int vorbis_analysis ( vorbis_block* vb, ogg_packet* op ) ; -FUNCTION: int vorbis_bitrate_addblock ( vorbis_block* vb ) ; -FUNCTION: int vorbis_bitrate_flushpacket ( vorbis_dsp_state* vd, - ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_headerin ( vorbis_info* vi, vorbis_comment* vc, - ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ; -FUNCTION: int vorbis_synthesis_restart ( vorbis_dsp_state* v ) ; -FUNCTION: int vorbis_synthesis ( vorbis_block* vb, ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_trackonly ( vorbis_block* vb, ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_blockin ( vorbis_dsp_state* v, vorbis_block* vb ) ; -FUNCTION: int vorbis_synthesis_pcmout ( vorbis_dsp_state* v, float*** pcm ) ; -FUNCTION: int vorbis_synthesis_lapout ( vorbis_dsp_state* v, float*** pcm ) ; -FUNCTION: int vorbis_synthesis_read ( vorbis_dsp_state* v, int samples ) ; -FUNCTION: long vorbis_packet_blocksize ( vorbis_info* vi, ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_halfrate ( vorbis_info* v, int flag ) ; -FUNCTION: int vorbis_synthesis_halfrate_p ( vorbis_info* v ) ; +FUNCTION: void vorbis_info_init ( vorbis-info* vi ) ; +FUNCTION: void vorbis_info_clear ( vorbis-info* vi ) ; +FUNCTION: int vorbis_info_blocksize ( vorbis-info* vi, int zo ) ; +FUNCTION: void vorbis_comment_init ( vorbis-comment* vc ) ; +FUNCTION: void vorbis_comment_add ( vorbis-comment* vc, char* comment ) ; +FUNCTION: void vorbis_comment_add_tag ( vorbis-comment* vc, char* tag, char* contents ) ; +FUNCTION: char* vorbis_comment_query ( vorbis-comment* vc, char* tag, int count ) ; +FUNCTION: int vorbis_comment_query_count ( vorbis-comment* vc, char* tag ) ; +FUNCTION: void vorbis_comment_clear ( vorbis-comment* vc ) ; +FUNCTION: int vorbis_block_init ( vorbis-dsp-state* v, vorbis-block* vb ) ; +FUNCTION: int vorbis_block_clear ( vorbis-block* vb ) ; +FUNCTION: void vorbis_dsp_clear ( vorbis-dsp-state* v ) ; +FUNCTION: double vorbis_granule_time ( vorbis-dsp-state* v, longlong granulepos ) ; +FUNCTION: int vorbis_analysis_init ( vorbis-dsp-state* v, vorbis-info* vi ) ; +FUNCTION: int vorbis_commentheader_out ( vorbis-comment* vc, ogg-packet* op ) ; +FUNCTION: int vorbis_analysis_headerout ( vorbis-dsp-state* v, + vorbis-comment* vc, + ogg-packet* op, + ogg-packet* op_comm, + ogg-packet* op_code ) ; +FUNCTION: float** vorbis_analysis_buffer ( vorbis-dsp-state* v, int vals ) ; +FUNCTION: int vorbis_analysis_wrote ( vorbis-dsp-state* v, int vals ) ; +FUNCTION: int vorbis_analysis_blockout ( vorbis-dsp-state* v, vorbis-block* vb ) ; +FUNCTION: int vorbis_analysis ( vorbis-block* vb, ogg-packet* op ) ; +FUNCTION: int vorbis_bitrate_addblock ( vorbis-block* vb ) ; +FUNCTION: int vorbis_bitrate_flushpacket ( vorbis-dsp-state* vd, + ogg-packet* op ) ; +FUNCTION: int vorbis_synthesis_headerin ( vorbis-info* vi, vorbis-comment* vc, + ogg-packet* op ) ; +FUNCTION: int vorbis_synthesis_init ( vorbis-dsp-state* v, vorbis-info* vi ) ; +FUNCTION: int vorbis_synthesis_restart ( vorbis-dsp-state* v ) ; +FUNCTION: int vorbis_synthesis ( vorbis-block* vb, ogg-packet* op ) ; +FUNCTION: int vorbis_synthesis_trackonly ( vorbis-block* vb, ogg-packet* op ) ; +FUNCTION: int vorbis_synthesis_blockin ( vorbis-dsp-state* v, vorbis-block* vb ) ; +FUNCTION: int vorbis_synthesis_pcmout ( vorbis-dsp-state* v, float*** pcm ) ; +FUNCTION: int vorbis_synthesis_lapout ( vorbis-dsp-state* v, float*** pcm ) ; +FUNCTION: int vorbis_synthesis_read ( vorbis-dsp-state* v, int samples ) ; +FUNCTION: long vorbis_packet_blocksize ( vorbis-info* vi, ogg-packet* op ) ; +FUNCTION: int vorbis_synthesis_halfrate ( vorbis-info* v, int flag ) ; +FUNCTION: int vorbis_synthesis_halfrate_p ( vorbis-info* v ) ; -: OV_FALSE ( -- number ) -1 ; inline -: OV_EOF ( -- number ) -2 ; inline -: OV_HOLE ( -- number ) -3 ; inline -: OV_EREAD ( -- number ) -128 ; inline -: OV_EFAULT ( -- number ) -129 ; inline -: OV_EIMPL ( -- number ) -130 ; inline -: OV_EINVAL ( -- number ) -131 ; inline -: OV_ENOTVORBIS ( -- number ) -132 ; inline -: OV_EBADHEADER ( -- number ) -133 ; inline -: OV_EVERSION ( -- number ) -134 ; inline -: OV_ENOTAUDIO ( -- number ) -135 ; inline -: OV_EBADPACKET ( -- number ) -136 ; inline -: OV_EBADLINK ( -- number ) -137 ; inline -: OV_ENOSEEK ( -- number ) -138 ; inline +CONSTANT: OV_FALSE -1 +CONSTANT: OV_EOF -2 +CONSTANT: OV_HOLE -3 +CONSTANT: OV_EREAD -128 +CONSTANT: OV_EFAULT -129 +CONSTANT: OV_EIMPL -130 +CONSTANT: OV_EINVAL -131 +CONSTANT: OV_ENOTVORBIS -132 +CONSTANT: OV_EBADHEADER -133 +CONSTANT: OV_EVERSION -134 +CONSTANT: OV_ENOTAUDIO -135 +CONSTANT: OV_EBADPACKET -136 +CONSTANT: OV_EBADLINK -137 +CONSTANT: OV_ENOSEEK -138 From d1a67c358ef010d2cda650ed2bf537b2609e17da Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 25 Sep 2009 16:44:59 +1200 Subject: [PATCH 5/6] Change shared libaries used by libtheora for new theora api --- extra/ogg/theora/theora.factor | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/extra/ogg/theora/theora.factor b/extra/ogg/theora/theora.factor index ad5c0c512e..c9141fb9e3 100644 --- a/extra/ogg/theora/theora.factor +++ b/extra/ogg/theora/theora.factor @@ -15,15 +15,19 @@ USING: IN: ogg.theora << -"theora" { - { [ os winnt? ] [ "theora.dll" ] } - { [ os macosx? ] [ "libtheora.0.dylib" ] } - { [ os unix? ] [ "libtheora.so" ] } +"theoradec" { + { [ os winnt? ] [ "theoradec.dll" ] } + { [ os macosx? ] [ "libtheoradec.0.dylib" ] } + { [ os unix? ] [ "libtheoradec.so" ] } +} cond "cdecl" add-library + +"theoraenc" { + { [ os winnt? ] [ "theoraenc.dll" ] } + { [ os macosx? ] [ "libtheoraenc.0.dylib" ] } + { [ os unix? ] [ "libtheoraenc.so" ] } } cond "cdecl" add-library >> -LIBRARY: theora - CONSTANT: TH-EFAULT -1 CONSTANT: TH-EINVAL -10 CONSTANT: TH-EBADHEADER -20 @@ -105,6 +109,7 @@ STRUCT: th-huff-code { nbits int } ; +LIBRARY: theoradec FUNCTION: char* th_version_string ( ) ; FUNCTION: uint th_version_number ( ) ; FUNCTION: longlong th_granule_frame ( void* encdec, longlong granpos) ; @@ -139,6 +144,7 @@ CONSTANT: TH-RATECTL-CAP-UNDERFOW 4 TYPEDEF: void* th-enc-ctx +LIBRARY: theoraenc FUNCTION: th-enc-ctx* th_encode_alloc ( th-info* info ) ; FUNCTION: int th_encode_ctl ( th-enc-ctx* enc, int req, void* buf, int buf_sz ) ; FUNCTION: int th_encode_flushheader ( th-enc-ctx* enc, th-comment* comments, ogg-packet* op ) ; @@ -165,6 +171,7 @@ STRUCT: th-stripe-callback TYPEDEF: void* th-dec-ctx TYPEDEF: void* th-setup-info +LIBRARY: theoradec FUNCTION: int th_decode_headerin ( th-info* info, th-comment* tc, th-setup-info** setup, ogg-packet* op ) ; FUNCTION: th-dec-ctx* th_decode_alloc ( th-info* info, th-setup-info* setup ) ; FUNCTION: void th_setup_free ( th-setup-info* setup ) ; From 1591f1b723b2c924bf4bb99e2660ab4098824e3e Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 25 Sep 2009 16:46:22 +1200 Subject: [PATCH 6/6] Remove unmaintained/ogg code --- unmaintained/ogg/authors.txt | 1 - unmaintained/ogg/ogg.factor | 132 ------------------------ unmaintained/ogg/summary.txt | 1 - unmaintained/ogg/tags.txt | 3 - unmaintained/ogg/theora/authors.txt | 1 - unmaintained/ogg/theora/summary.txt | 1 - unmaintained/ogg/theora/tags.txt | 1 - unmaintained/ogg/theora/theora.factor | 120 ---------------------- unmaintained/ogg/vorbis/authors.txt | 1 - unmaintained/ogg/vorbis/summary.txt | 1 - unmaintained/ogg/vorbis/tags.txt | 1 - unmaintained/ogg/vorbis/vorbis.factor | 141 -------------------------- 12 files changed, 404 deletions(-) delete mode 100644 unmaintained/ogg/authors.txt delete mode 100644 unmaintained/ogg/ogg.factor delete mode 100644 unmaintained/ogg/summary.txt delete mode 100644 unmaintained/ogg/tags.txt delete mode 100644 unmaintained/ogg/theora/authors.txt delete mode 100644 unmaintained/ogg/theora/summary.txt delete mode 100644 unmaintained/ogg/theora/tags.txt delete mode 100644 unmaintained/ogg/theora/theora.factor delete mode 100644 unmaintained/ogg/vorbis/authors.txt delete mode 100644 unmaintained/ogg/vorbis/summary.txt delete mode 100644 unmaintained/ogg/vorbis/tags.txt delete mode 100644 unmaintained/ogg/vorbis/vorbis.factor diff --git a/unmaintained/ogg/authors.txt b/unmaintained/ogg/authors.txt deleted file mode 100644 index 44b06f94bc..0000000000 --- a/unmaintained/ogg/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Chris Double diff --git a/unmaintained/ogg/ogg.factor b/unmaintained/ogg/ogg.factor deleted file mode 100644 index 37dd30f7fd..0000000000 --- a/unmaintained/ogg/ogg.factor +++ /dev/null @@ -1,132 +0,0 @@ -! Copyright (C) 2007 Chris Double. -! See http://factorcode.org/license.txt for BSD license. -! -USING: kernel system combinators alien alien.syntax ; -IN: ogg - -<< -"ogg" { - { [ os winnt? ] [ "ogg.dll" ] } - { [ os macosx? ] [ "libogg.0.dylib" ] } - { [ os unix? ] [ "libogg.so" ] } -} cond "cdecl" add-library ->> - -LIBRARY: ogg - -C-STRUCT: oggpack_buffer - { "long" "endbyte" } - { "int" "endbit" } - { "uchar*" "buffer" } - { "uchar*" "ptr" } - { "long" "storage" } ; - -C-STRUCT: ogg_page - { "uchar*" "header" } - { "long" "header_len" } - { "uchar*" "body" } - { "long" "body_len" } ; - -C-STRUCT: ogg_stream_state - { "uchar*" "body_data" } - { "long" "body_storage" } - { "long" "body_fill" } - { "long" "body_returned" } - { "int*" "lacing_vals" } - { "longlong*" "granule_vals" } - { "long" "lacing_storage" } - { "long" "lacing_fill" } - { "long" "lacing_packet" } - { "long" "lacing_returned" } - { { "uchar" 282 } "header" } - { "int" "header_fill" } - { "int" "e_o_s" } - { "int" "b_o_s" } - { "long" "serialno" } - { "long" "pageno" } - { "longlong" "packetno" } - { "longlong" "granulepos" } ; - -C-STRUCT: ogg_packet - { "uchar*" "packet" } - { "long" "bytes" } - { "long" "b_o_s" } - { "long" "e_o_s" } - { "longlong" "granulepos" } - { "longlong" "packetno" } ; - -C-STRUCT: ogg_sync_state - { "uchar*" "data" } - { "int" "storage" } - { "int" "fill" } - { "int" "returned" } - { "int" "unsynced" } - { "int" "headerbytes" } - { "int" "bodybytes" } ; - -FUNCTION: void oggpack_writeinit ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_writetrunc ( oggpack_buffer* b, long bits ) ; -FUNCTION: void oggpack_writealign ( oggpack_buffer* b) ; -FUNCTION: void oggpack_writecopy ( oggpack_buffer* b, void* source, long bits ) ; -FUNCTION: void oggpack_reset ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_writeclear ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ; -FUNCTION: void oggpack_write ( oggpack_buffer* b, ulong value, int bits ) ; -FUNCTION: long oggpack_look ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpack_look1 ( oggpack_buffer* b ) ; -FUNCTION: void oggpack_adv ( oggpack_buffer* b, int bits ) ; -FUNCTION: void oggpack_adv1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpack_read ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpack_read1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpack_bytes ( oggpack_buffer* b ) ; -FUNCTION: long oggpack_bits ( oggpack_buffer* b ) ; -FUNCTION: uchar* oggpack_get_buffer ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writeinit ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writetrunc ( oggpack_buffer* b, long bits ) ; -FUNCTION: void oggpackB_writealign ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writecopy ( oggpack_buffer* b, void* source, long bits ) ; -FUNCTION: void oggpackB_reset ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_writeclear ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_readinit ( oggpack_buffer* b, uchar* buf, int bytes ) ; -FUNCTION: void oggpackB_write ( oggpack_buffer* b, ulong value, int bits ) ; -FUNCTION: long oggpackB_look ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpackB_look1 ( oggpack_buffer* b ) ; -FUNCTION: void oggpackB_adv ( oggpack_buffer* b, int bits ) ; -FUNCTION: void oggpackB_adv1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpackB_read ( oggpack_buffer* b, int bits ) ; -FUNCTION: long oggpackB_read1 ( oggpack_buffer* b ) ; -FUNCTION: long oggpackB_bytes ( oggpack_buffer* b ) ; -FUNCTION: long oggpackB_bits ( oggpack_buffer* b ) ; -FUNCTION: uchar* oggpackB_get_buffer ( oggpack_buffer* b ) ; -FUNCTION: int ogg_stream_packetin ( ogg_stream_state* os, ogg_packet* op ) ; -FUNCTION: int ogg_stream_pageout ( ogg_stream_state* os, ogg_page* og ) ; -FUNCTION: int ogg_stream_flush ( ogg_stream_state* os, ogg_page* og ) ; -FUNCTION: int ogg_sync_init ( ogg_sync_state* oy ) ; -FUNCTION: int ogg_sync_clear ( ogg_sync_state* oy ) ; -FUNCTION: int ogg_sync_reset ( ogg_sync_state* oy ) ; -FUNCTION: int ogg_sync_destroy ( ogg_sync_state* oy ) ; - -FUNCTION: void* ogg_sync_buffer ( ogg_sync_state* oy, long size ) ; -FUNCTION: int ogg_sync_wrote ( ogg_sync_state* oy, long bytes ) ; -FUNCTION: long ogg_sync_pageseek ( ogg_sync_state* oy, ogg_page* og ) ; -FUNCTION: int ogg_sync_pageout ( ogg_sync_state* oy, ogg_page* og ) ; -FUNCTION: int ogg_stream_pagein ( ogg_stream_state* os, ogg_page* og ) ; -FUNCTION: int ogg_stream_packetout ( ogg_stream_state* os, ogg_packet* op ) ; -FUNCTION: int ogg_stream_packetpeek ( ogg_stream_state* os, ogg_packet* op ) ; -FUNCTION: int ogg_stream_init (ogg_stream_state* os, int serialno ) ; -FUNCTION: int ogg_stream_clear ( ogg_stream_state* os ) ; -FUNCTION: int ogg_stream_reset ( ogg_stream_state* os ) ; -FUNCTION: int ogg_stream_reset_serialno ( ogg_stream_state* os, int serialno ) ; -FUNCTION: int ogg_stream_destroy ( ogg_stream_state* os ) ; -FUNCTION: int ogg_stream_eos ( ogg_stream_state* os ) ; -FUNCTION: void ogg_page_checksum_set ( ogg_page* og ) ; -FUNCTION: int ogg_page_version ( ogg_page* og ) ; -FUNCTION: int ogg_page_continued ( ogg_page* og ) ; -FUNCTION: int ogg_page_bos ( ogg_page* og ) ; -FUNCTION: int ogg_page_eos ( ogg_page* og ) ; -FUNCTION: longlong ogg_page_granulepos ( ogg_page* og ) ; -FUNCTION: int ogg_page_serialno ( ogg_page* og ) ; -FUNCTION: long ogg_page_pageno ( ogg_page* og ) ; -FUNCTION: int ogg_page_packets ( ogg_page* og ) ; -FUNCTION: void ogg_packet_clear ( ogg_packet* op ) ; - diff --git a/unmaintained/ogg/summary.txt b/unmaintained/ogg/summary.txt deleted file mode 100644 index 3d2b5511c9..0000000000 --- a/unmaintained/ogg/summary.txt +++ /dev/null @@ -1 +0,0 @@ -Ogg media library binding diff --git a/unmaintained/ogg/tags.txt b/unmaintained/ogg/tags.txt deleted file mode 100644 index be30e2cdd4..0000000000 --- a/unmaintained/ogg/tags.txt +++ /dev/null @@ -1,3 +0,0 @@ -bindings -audio -video diff --git a/unmaintained/ogg/theora/authors.txt b/unmaintained/ogg/theora/authors.txt deleted file mode 100644 index 44b06f94bc..0000000000 --- a/unmaintained/ogg/theora/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Chris Double diff --git a/unmaintained/ogg/theora/summary.txt b/unmaintained/ogg/theora/summary.txt deleted file mode 100644 index aa5ec1fdf7..0000000000 --- a/unmaintained/ogg/theora/summary.txt +++ /dev/null @@ -1 +0,0 @@ -Ogg Theora video library binding diff --git a/unmaintained/ogg/theora/tags.txt b/unmaintained/ogg/theora/tags.txt deleted file mode 100644 index 2b68b5238a..0000000000 --- a/unmaintained/ogg/theora/tags.txt +++ /dev/null @@ -1 +0,0 @@ -video diff --git a/unmaintained/ogg/theora/theora.factor b/unmaintained/ogg/theora/theora.factor deleted file mode 100644 index 3d73fb8820..0000000000 --- a/unmaintained/ogg/theora/theora.factor +++ /dev/null @@ -1,120 +0,0 @@ -! Copyright (C) 2007 Chris Double. -! See http://factorcode.org/license.txt for BSD license. -! -USING: kernel system combinators alien alien.syntax ; -IN: ogg.theora - -<< -"theora" { - { [ os winnt? ] [ "theora.dll" ] } - { [ os macosx? ] [ "libtheora.0.dylib" ] } - { [ os unix? ] [ "libtheora.so" ] } -} cond "cdecl" add-library ->> - -LIBRARY: theora - -C-STRUCT: yuv_buffer - { "int" "y_width" } - { "int" "y_height" } - { "int" "y_stride" } - { "int" "uv_width" } - { "int" "uv_height" } - { "int" "uv_stride" } - { "void*" "y" } - { "void*" "u" } - { "void*" "v" } ; - -: OC_CS_UNSPECIFIED ( -- number ) 0 ; inline -: OC_CS_ITU_REC_470M ( -- number ) 1 ; inline -: OC_CS_ITU_REC_470BG ( -- number ) 2 ; inline -: OC_CS_NSPACES ( -- number ) 3 ; inline - -TYPEDEF: int theora_colorspace - -: OC_PF_420 ( -- number ) 0 ; inline -: OC_PF_RSVD ( -- number ) 1 ; inline -: OC_PF_422 ( -- number ) 2 ; inline -: OC_PF_444 ( -- number ) 3 ; inline - -TYPEDEF: int theora_pixelformat - -C-STRUCT: theora_info - { "uint" "width" } - { "uint" "height" } - { "uint" "frame_width" } - { "uint" "frame_height" } - { "uint" "offset_x" } - { "uint" "offset_y" } - { "uint" "fps_numerator" } - { "uint" "fps_denominator" } - { "uint" "aspect_numerator" } - { "uint" "aspect_denominator" } - { "theora_colorspace" "colorspace" } - { "int" "target_bitrate" } - { "int" "quality" } - { "int" "quick_p" } - { "uchar" "version_major" } - { "uchar" "version_minor" } - { "uchar" "version_subminor" } - { "void*" "codec_setup" } - { "int" "dropframes_p" } - { "int" "keyframe_auto_p" } - { "uint" "keyframe_frequency" } - { "uint" "keyframe_frequency_force" } - { "uint" "keyframe_data_target_bitrate" } - { "int" "keyframe_auto_threshold" } - { "uint" "keyframe_mindistance" } - { "int" "noise_sensitivity" } - { "int" "sharpness" } - { "theora_pixelformat" "pixelformat" } ; - -C-STRUCT: theora_state - { "theora_info*" "i" } - { "longlong" "granulepos" } - { "void*" "internal_encode" } - { "void*" "internal_decode" } ; - -C-STRUCT: theora_comment - { "char**" "user_comments" } - { "int*" "comment_lengths" } - { "int" "comments" } - { "char*" "vendor" } ; - -: OC_FAULT ( -- number ) -1 ; inline -: OC_EINVAL ( -- number ) -10 ; inline -: OC_DISABLED ( -- number ) -11 ; inline -: OC_BADHEADER ( -- number ) -20 ; inline -: OC_NOTFORMAT ( -- number ) -21 ; inline -: OC_VERSION ( -- number ) -22 ; inline -: OC_IMPL ( -- number ) -23 ; inline -: OC_BADPACKET ( -- number ) -24 ; inline -: OC_NEWPACKET ( -- number ) -25 ; inline -: OC_DUPFRAME ( -- number ) 1 ; inline - -FUNCTION: char* theora_version_string ( ) ; -FUNCTION: uint theora_version_number ( ) ; -FUNCTION: int theora_encode_init ( theora_state* th, theora_info* ti ) ; -FUNCTION: int theora_encode_YUVin ( theora_state* t, yuv_buffer* yuv ) ; -FUNCTION: int theora_encode_packetout ( theora_state* t, int last_p, ogg_packet* op ) ; -FUNCTION: int theora_encode_header ( theora_state* t, ogg_packet* op ) ; -FUNCTION: int theora_encode_comment ( theora_comment* tc, ogg_packet* op ) ; -FUNCTION: int theora_encode_tables ( theora_state* t, ogg_packet* op ) ; -FUNCTION: int theora_decode_header ( theora_info* ci, theora_comment* cc, ogg_packet* op ) ; -FUNCTION: int theora_decode_init ( theora_state* th, theora_info* c ) ; -FUNCTION: int theora_decode_packetin ( theora_state* th, ogg_packet* op ) ; -FUNCTION: int theora_decode_YUVout ( theora_state* th, yuv_buffer* yuv ) ; -FUNCTION: int theora_packet_isheader ( ogg_packet* op ) ; -FUNCTION: int theora_packet_iskeyframe ( ogg_packet* op ) ; -FUNCTION: int theora_granule_shift ( theora_info* ti ) ; -FUNCTION: longlong theora_granule_frame ( theora_state* th, longlong granulepos ) ; -FUNCTION: double theora_granule_time ( theora_state* th, longlong granulepos ) ; -FUNCTION: void theora_info_init ( theora_info* c ) ; -FUNCTION: void theora_info_clear ( theora_info* c ) ; -FUNCTION: void theora_clear ( theora_state* t ) ; -FUNCTION: void theora_comment_init ( theora_comment* tc ) ; -FUNCTION: void theora_comment_add ( theora_comment* tc, char* comment ) ; -FUNCTION: void theora_comment_add_tag ( theora_comment* tc, char* tag, char* value ) ; -FUNCTION: char* theora_comment_query ( theora_comment* tc, char* tag, int count ) ; -FUNCTION: int theora_comment_query_count ( theora_comment* tc, char* tag ) ; -FUNCTION: void theora_comment_clear ( theora_comment* tc ) ; diff --git a/unmaintained/ogg/vorbis/authors.txt b/unmaintained/ogg/vorbis/authors.txt deleted file mode 100644 index 44b06f94bc..0000000000 --- a/unmaintained/ogg/vorbis/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Chris Double diff --git a/unmaintained/ogg/vorbis/summary.txt b/unmaintained/ogg/vorbis/summary.txt deleted file mode 100644 index 1a8118ffe2..0000000000 --- a/unmaintained/ogg/vorbis/summary.txt +++ /dev/null @@ -1 +0,0 @@ -Ogg Vorbis audio library binding diff --git a/unmaintained/ogg/vorbis/tags.txt b/unmaintained/ogg/vorbis/tags.txt deleted file mode 100644 index d5cc28426a..0000000000 --- a/unmaintained/ogg/vorbis/tags.txt +++ /dev/null @@ -1 +0,0 @@ -audio diff --git a/unmaintained/ogg/vorbis/vorbis.factor b/unmaintained/ogg/vorbis/vorbis.factor deleted file mode 100644 index 5712272ebc..0000000000 --- a/unmaintained/ogg/vorbis/vorbis.factor +++ /dev/null @@ -1,141 +0,0 @@ -! Copyright (C) 2007 Chris Double. -! See http://factorcode.org/license.txt for BSD license. -! -USING: kernel system combinators alien alien.syntax ogg ; -IN: ogg.vorbis - -<< -"vorbis" { - { [ os winnt? ] [ "vorbis.dll" ] } - { [ os macosx? ] [ "libvorbis.0.dylib" ] } - { [ os unix? ] [ "libvorbis.so" ] } -} cond "cdecl" add-library ->> - -LIBRARY: vorbis - -C-STRUCT: vorbis_info - { "int" "version" } - { "int" "channels" } - { "long" "rate" } - { "long" "bitrate_upper" } - { "long" "bitrate_nominal" } - { "long" "bitrate_lower" } - { "long" "bitrate_window" } - { "void*" "codec_setup"} - ; - -C-STRUCT: vorbis_dsp_state - { "int" "analysisp" } - { "vorbis_info*" "vi" } - { "float**" "pcm" } - { "float**" "pcmret" } - { "int" "pcm_storage" } - { "int" "pcm_current" } - { "int" "pcm_returned" } - { "int" "preextrapolate" } - { "int" "eofflag" } - { "long" "lW" } - { "long" "W" } - { "long" "nW" } - { "long" "centerW" } - { "longlong" "granulepos" } - { "longlong" "sequence" } - { "longlong" "glue_bits" } - { "longlong" "time_bits" } - { "longlong" "floor_bits" } - { "longlong" "res_bits" } - { "void*" "backend_state" } - ; - -C-STRUCT: alloc_chain - { "void*" "ptr" } - { "void*" "next" } - ; - -C-STRUCT: vorbis_block - { "float**" "pcm" } - { "oggpack_buffer" "opb" } - { "long" "lW" } - { "long" "W" } - { "long" "nW" } - { "int" "pcmend" } - { "int" "mode" } - { "int" "eofflag" } - { "longlong" "granulepos" } - { "longlong" "sequence" } - { "vorbis_dsp_state*" "vd" } - { "void*" "localstore" } - { "long" "localtop" } - { "long" "localalloc" } - { "long" "totaluse" } - { "alloc_chain*" "reap" } - { "long" "glue_bits" } - { "long" "time_bits" } - { "long" "floor_bits" } - { "long" "res_bits" } - { "void*" "internal" } - ; - -C-STRUCT: vorbis_comment - { "char**" "usercomments" } - { "int*" "comment_lengths" } - { "int" "comments" } - { "char*" "vendor" } - ; - -FUNCTION: void vorbis_info_init ( vorbis_info* vi ) ; -FUNCTION: void vorbis_info_clear ( vorbis_info* vi ) ; -FUNCTION: int vorbis_info_blocksize ( vorbis_info* vi, int zo ) ; -FUNCTION: void vorbis_comment_init ( vorbis_comment* vc ) ; -FUNCTION: void vorbis_comment_add ( vorbis_comment* vc, char* comment ) ; -FUNCTION: void vorbis_comment_add_tag ( vorbis_comment* vc, char* tag, char* contents ) ; -FUNCTION: char* vorbis_comment_query ( vorbis_comment* vc, char* tag, int count ) ; -FUNCTION: int vorbis_comment_query_count ( vorbis_comment* vc, char* tag ) ; -FUNCTION: void vorbis_comment_clear ( vorbis_comment* vc ) ; -FUNCTION: int vorbis_block_init ( vorbis_dsp_state* v, vorbis_block* vb ) ; -FUNCTION: int vorbis_block_clear ( vorbis_block* vb ) ; -FUNCTION: void vorbis_dsp_clear ( vorbis_dsp_state* v ) ; -FUNCTION: double vorbis_granule_time ( vorbis_dsp_state* v, longlong granulepos ) ; -FUNCTION: int vorbis_analysis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ; -FUNCTION: int vorbis_commentheader_out ( vorbis_comment* vc, ogg_packet* op ) ; -FUNCTION: int vorbis_analysis_headerout ( vorbis_dsp_state* v, - vorbis_comment* vc, - ogg_packet* op, - ogg_packet* op_comm, - ogg_packet* op_code ) ; -FUNCTION: float** vorbis_analysis_buffer ( vorbis_dsp_state* v, int vals ) ; -FUNCTION: int vorbis_analysis_wrote ( vorbis_dsp_state* v, int vals ) ; -FUNCTION: int vorbis_analysis_blockout ( vorbis_dsp_state* v, vorbis_block* vb ) ; -FUNCTION: int vorbis_analysis ( vorbis_block* vb, ogg_packet* op ) ; -FUNCTION: int vorbis_bitrate_addblock ( vorbis_block* vb ) ; -FUNCTION: int vorbis_bitrate_flushpacket ( vorbis_dsp_state* vd, - ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_headerin ( vorbis_info* vi, vorbis_comment* vc, - ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ; -FUNCTION: int vorbis_synthesis_restart ( vorbis_dsp_state* v ) ; -FUNCTION: int vorbis_synthesis ( vorbis_block* vb, ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_trackonly ( vorbis_block* vb, ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_blockin ( vorbis_dsp_state* v, vorbis_block* vb ) ; -FUNCTION: int vorbis_synthesis_pcmout ( vorbis_dsp_state* v, float*** pcm ) ; -FUNCTION: int vorbis_synthesis_lapout ( vorbis_dsp_state* v, float*** pcm ) ; -FUNCTION: int vorbis_synthesis_read ( vorbis_dsp_state* v, int samples ) ; -FUNCTION: long vorbis_packet_blocksize ( vorbis_info* vi, ogg_packet* op ) ; -FUNCTION: int vorbis_synthesis_halfrate ( vorbis_info* v, int flag ) ; -FUNCTION: int vorbis_synthesis_halfrate_p ( vorbis_info* v ) ; - -: OV_FALSE ( -- number ) -1 ; inline -: OV_EOF ( -- number ) -2 ; inline -: OV_HOLE ( -- number ) -3 ; inline -: OV_EREAD ( -- number ) -128 ; inline -: OV_EFAULT ( -- number ) -129 ; inline -: OV_EIMPL ( -- number ) -130 ; inline -: OV_EINVAL ( -- number ) -131 ; inline -: OV_ENOTVORBIS ( -- number ) -132 ; inline -: OV_EBADHEADER ( -- number ) -133 ; inline -: OV_EVERSION ( -- number ) -134 ; inline -: OV_ENOTAUDIO ( -- number ) -135 ; inline -: OV_EBADPACKET ( -- number ) -136 ; inline -: OV_EBADLINK ( -- number ) -137 ; inline -: OV_ENOSEEK ( -- number ) -138 ; inline