Merge remote branch 'ex-rzr/master' into gtk

db4
Philipp Brüschweiler 2010-07-26 18:54:46 +02:00
commit f3f8b3b35b
122 changed files with 60743 additions and 351 deletions

View File

@ -258,7 +258,7 @@ M: pointer c-type
2 >>align
2 >>align-first
"from_signed_2" >>boxer
"to_fixnum" >>unboxer
"to_signed_2" >>unboxer
[ >fixnum ] >>unboxer-quot
\ short define-primitive-type
@ -271,7 +271,7 @@ M: pointer c-type
2 >>align
2 >>align-first
"from_unsigned_2" >>boxer
"to_cell" >>unboxer
"to_unsigned_2" >>unboxer
[ >fixnum ] >>unboxer-quot
\ ushort define-primitive-type
@ -284,7 +284,7 @@ M: pointer c-type
1 >>align
1 >>align-first
"from_signed_1" >>boxer
"to_fixnum" >>unboxer
"to_signed_1" >>unboxer
[ >fixnum ] >>unboxer-quot
\ char define-primitive-type
@ -297,7 +297,7 @@ M: pointer c-type
1 >>align
1 >>align-first
"from_unsigned_1" >>boxer
"to_cell" >>unboxer
"to_unsigned_1" >>unboxer
[ >fixnum ] >>unboxer-quot
\ uchar define-primitive-type
@ -338,7 +338,7 @@ M: pointer c-type
4 >>align
4 >>align-first
"from_signed_4" >>boxer
"to_fixnum" >>unboxer
"to_signed_4" >>unboxer
[ >fixnum ] >>unboxer-quot
\ int define-primitive-type
@ -351,7 +351,7 @@ M: pointer c-type
4 >>align
4 >>align-first
"from_unsigned_4" >>boxer
"to_cell" >>unboxer
"to_unsigned_4" >>unboxer
[ >fixnum ] >>unboxer-quot
\ uint define-primitive-type

View File

@ -185,3 +185,6 @@ IN: calendar.tests
2008 1 29 <date> 1 months time+
2008 2 29 <date> =
] unit-test
[ 0 ]
[ gmt gmt-offset>> duration>seconds ] unit-test

View File

@ -532,7 +532,7 @@ M: integer end-of-year 12 31 <date> ;
dup midnight time- ;
: since-1970 ( duration -- timestamp )
unix-1970 time+ >local-time ;
unix-1970 time+ ;
: timestamp>unix-time ( timestamp -- seconds )
unix-1970 time- second>> ;

View File

@ -11,14 +11,14 @@ IN: calendar.unix
: timeval>unix-time ( timeval -- timestamp )
timeval>duration since-1970 ;
: timespec>seconds ( timespec -- seconds )
: timespec>duration ( timespec -- seconds )
[ sec>> seconds ] [ nsec>> nanoseconds ] bi time+ ;
: timespec>nanoseconds ( timespec -- seconds )
[ sec>> 1000000000 * ] [ nsec>> ] bi + ;
: timespec>unix-time ( timespec -- timestamp )
timespec>seconds since-1970 ;
timespec>duration since-1970 ;
: get-time ( -- alien )
f time <time_t> localtime ;

View File

@ -299,6 +299,7 @@ M: ##compare analyze-aliases
\ ##alien-global set-new-ac ;
M: factor-call-insn analyze-aliases
call-next-method
heap-ac get ac>vregs [
[ live-slots get at clear-assoc ]
[ recent-stores get at clear-assoc ] bi

View File

@ -6,6 +6,7 @@ sequences sequences.generalizations system
compiler.cfg.builder.alien.params compiler.cfg.hats
compiler.cfg.registers compiler.cfg.instructions
compiler.cfg.intrinsics.allot cpu.architecture ;
QUALIFIED-WITH: alien.c-types c
IN: compiler.cfg.builder.alien.boxing
SYMBOL: struct-return-area
@ -49,9 +50,15 @@ M: c-type unbox
[ rep>> ] [ unboxer>> ] bi
[
{
! { "to_float" [ drop ] }
! { "to_double" [ drop ] }
! { "alien_offset" [ drop ^^unbox-any-c-ptr ] }
{ "to_float" [ drop ] }
{ "to_double" [ drop ] }
{ "to_signed_1" [ drop ] }
{ "to_unsigned_1" [ drop ] }
{ "to_signed_2" [ drop ] }
{ "to_unsigned_2" [ drop ] }
{ "to_signed_4" [ drop ] }
{ "to_unsigned_4" [ drop ] }
{ "alien_offset" [ drop ^^unbox-any-c-ptr ] }
[ swap ^^unbox ]
} case 1array
]
@ -107,9 +114,15 @@ GENERIC: box ( vregs reps c-type -- dst )
M: c-type box
[ [ first ] bi@ ] [ boxer>> ] bi*
{
! { "from_float" [ drop ] }
! { "from_double" [ drop ] }
! { "allot_alien" [ drop ^^box-alien ] }
{ "from_float" [ drop ] }
{ "from_double" [ drop ] }
{ "from_signed_1" [ drop c:char ^^convert-integer ] }
{ "from_unsigned_1" [ drop c:uchar ^^convert-integer ] }
{ "from_signed_2" [ drop c:short ^^convert-integer ] }
{ "from_unsigned_2" [ drop c:ushort ^^convert-integer ] }
{ "from_signed_4" [ drop c:int ^^convert-integer ] }
{ "from_unsigned_4" [ drop c:uint ^^convert-integer ] }
{ "allot_alien" [ drop ^^box-alien ] }
[ swap <gc-map> ^^box ]
} case ;

View File

@ -80,12 +80,9 @@ M: ##callback-outputs uses-vregs
tri
] with-compilation-unit
! Computing def-use chains.
SYMBOLS: defs insns uses ;
SYMBOLS: defs insns ;
: def-of ( vreg -- node ) defs get at ;
: uses-of ( vreg -- nodes ) uses get at ;
: insn-of ( vreg -- insn ) insns get at ;
: set-def-of ( obj insn assoc -- )
@ -98,8 +95,7 @@ SYMBOLS: defs insns uses ;
_ set-def-of
] with each
] each-basic-block
] keep
defs set ;
] keep defs set ;
: compute-insns ( cfg -- )
H{ } clone [

View File

@ -591,6 +591,12 @@ FOLDABLE-INSN: ##unbox-alien
def: dst/int-rep
use: src/tagged-rep ;
! Zero-extending and sign-extending integers
FOLDABLE-INSN: ##convert-integer
def: dst/int-rep
use: src/int-rep
literal: c-type ;
! Raw memory accessors
FLUSHABLE-INSN: ##load-memory
def: dst

View File

@ -48,52 +48,33 @@ IN: compiler.cfg.linear-scan.allocation
2dup spill-at-sync-point?
[ swap n>> spill f ] [ 2drop t ] if ;
: handle-interval ( live-interval -- )
GENERIC: handle ( obj -- )
M: live-interval handle
[ start>> deactivate-intervals ]
[ start>> activate-intervals ]
[ assign-register ]
tri ;
: (handle-sync-point) ( sync-point -- )
: handle-sync-point ( sync-point -- )
active-intervals get values
[ [ spill-at-sync-point ] with filter! drop ] with each ;
: handle-sync-point ( sync-point -- )
M: sync-point handle ( sync-point -- )
[ n>> deactivate-intervals ]
[ (handle-sync-point) ]
[ handle-sync-point ]
[ n>> activate-intervals ]
tri ;
: smallest-heap ( heap1 heap2 -- heap )
[ [ heap-peek nip ] bi@ <= ] most ;
:: (allocate-registers-step) ( unhandled-intervals unhandled-sync-points -- )
{
{
[ unhandled-intervals heap-empty? ]
[ unhandled-sync-points heap-pop drop handle-sync-point ]
}
{
[ unhandled-sync-points heap-empty? ]
[ unhandled-intervals heap-pop drop handle-interval ]
}
[
unhandled-intervals heap-peek :> ( i ik )
unhandled-sync-points heap-peek :> ( s sk )
{
{
[ ik sk < ]
[ unhandled-intervals heap-pop* i handle-interval ]
}
{
[ ik sk > ]
[ unhandled-sync-points heap-pop* s handle-sync-point ]
}
[
unhandled-intervals heap-pop*
i handle-interval
s (handle-sync-point)
]
} cond
]
} cond ;
{ [ unhandled-intervals heap-empty? ] [ unhandled-sync-points ] }
{ [ unhandled-sync-points heap-empty? ] [ unhandled-intervals ] }
[ unhandled-intervals unhandled-sync-points smallest-heap ]
} cond heap-pop drop handle ;
: (allocate-registers) ( unhandled-intervals unhandled-sync-points -- )
2dup [ heap-empty? ] both? [ 2drop ] [

View File

@ -79,12 +79,13 @@ ERROR: bad-live-ranges interval ;
: split-for-spill ( live-interval n -- before after )
split-interval [ spill-before ] [ spill-after ] bi* ;
: find-use-position ( live-interval new -- n )
[ uses>> ] [ start>> '[ n>> _ >= ] ] bi* find nip
: find-next-use ( live-interval new -- n )
[ uses>> ] [ start>> ] bi*
'[ [ spill-slot?>> not ] [ n>> ] bi _ >= and ] find nip
[ n>> ] [ 1/0. ] if* ;
: find-use-positions ( live-intervals new assoc -- )
'[ [ _ find-use-position ] [ reg>> ] bi _ add-use-position ] each ;
'[ [ _ find-next-use ] [ reg>> ] bi _ add-use-position ] each ;
: active-positions ( new assoc -- )
[ [ active-intervals-for ] keep ] dip

View File

@ -16,7 +16,7 @@ TUPLE: live-range from to ;
C: <live-range> live-range
TUPLE: vreg-use n def-rep use-rep ;
TUPLE: vreg-use n def-rep use-rep spill-slot? ;
: <vreg-use> ( n -- vreg-use ) vreg-use new swap >>n ;
@ -36,8 +36,10 @@ reg-class ;
: last-use? ( insn# uses -- use/f )
[ drop f ] [ last [ n>> = ] keep and ] if-empty ;
: (add-use) ( insn# live-interval -- use )
uses>> 2dup last-use? dup [ 2nip ] [ drop new-use ] if ;
:: (add-use) ( insn# live-interval spill-slot? -- use )
live-interval uses>> :> uses
insn# uses last-use? [ insn# uses new-use ] unless*
spill-slot? [ t >>spill-slot? ] when ;
GENERIC: covers? ( insn# obj -- ? )
@ -105,28 +107,42 @@ GENERIC: compute-live-intervals* ( insn -- )
M: insn compute-live-intervals* drop ;
:: record-def ( vreg n -- )
:: record-def ( vreg n spill-slot? -- )
vreg live-interval :> live-interval
n live-interval shorten-range
n live-interval (add-use) vreg rep-of >>def-rep drop ;
n live-interval spill-slot? (add-use) vreg rep-of >>def-rep drop ;
:: record-use ( vreg n -- )
:: record-use ( vreg n spill-slot? -- )
vreg live-interval :> live-interval
from get n live-interval add-range
n live-interval (add-use) vreg rep-of >>use-rep drop ;
n live-interval spill-slot? (add-use) vreg rep-of >>use-rep drop ;
:: record-temp ( vreg n -- )
vreg live-interval :> live-interval
n n live-interval add-range
n live-interval (add-use) vreg rep-of >>def-rep drop ;
n live-interval f (add-use) vreg rep-of >>def-rep drop ;
M: vreg-insn compute-live-intervals* ( insn -- )
dup insn#>>
[ [ defs-vregs ] dip '[ _ record-def ] each ]
[ [ uses-vregs ] dip '[ _ record-use ] each ]
[ [ defs-vregs ] dip '[ _ f record-def ] each ]
[ [ uses-vregs ] dip '[ _ f record-use ] each ]
[ [ temp-vregs ] dip '[ _ record-temp ] each ]
2tri ;
M: clobber-insn compute-live-intervals* ( insn -- )
dup insn#>>
[ [ defs-vregs ] dip '[ _ f record-def ] each ]
[ [ uses-vregs ] dip '[ _ t record-use ] each ]
[ [ temp-vregs ] dip '[ _ record-temp ] each ]
2tri ;
M: hairy-clobber-insn compute-live-intervals* ( insn -- )
dup insn#>>
[ [ defs-vregs ] dip '[ _ t record-def ] each ]
[ [ uses-vregs ] dip '[ _ t record-use ] each ]
[ [ temp-vregs ] dip '[ _ record-temp ] each ]
2tri ;

View File

@ -1,13 +1,19 @@
USING: compiler.cfg.liveness compiler.cfg.debugger
compiler.cfg.instructions compiler.cfg.predecessors
compiler.cfg.registers compiler.cfg cpu.architecture
accessors namespaces sequences kernel tools.test vectors ;
USING: compiler.cfg.liveness compiler.cfg.liveness.ssa
compiler.cfg.debugger compiler.cfg.instructions
compiler.cfg.predecessors compiler.cfg.registers compiler.cfg
cpu.architecture accessors namespaces sequences kernel
tools.test vectors alien math compiler.cfg.comparisons
cpu.x86.assembler.operands ;
IN: compiler.cfg.liveness.tests
: test-liveness ( -- )
cfg new 1 get >>entry
compute-live-sets ;
: test-ssa-liveness ( -- )
cfg new 1 get >>entry
compute-ssa-live-sets ;
! Sanity check...
V{
@ -30,7 +36,7 @@ V{
1 { 2 3 } edges
test-liveness
[ ] [ test-liveness ] unit-test
[
H{
@ -56,6 +62,95 @@ V{
1 2 edge
test-liveness
[ ] [ test-liveness ] unit-test
[ H{ { 0 0 } } ] [ 2 get live-in ] unit-test
[ H{ { 0 0 } } ] [ 2 get live-in ] unit-test
! Regression
V{
T{ ##prologue }
T{ ##branch }
} 0 test-bb
V{
T{ ##inc-r f 2 }
T{ ##inc-d f -2 }
T{ ##peek f 21 D -1 }
T{ ##peek f 22 D -2 }
T{ ##replace f 21 R 0 }
T{ ##replace f 22 R 1 }
T{ ##branch }
} 1 test-bb
V{
T{ ##call f >c-ptr }
T{ ##branch }
} 2 test-bb
V{
T{ ##inc-r f -1 }
T{ ##inc-d f 1 }
T{ ##peek f 25 R -1 }
T{ ##replace f 25 D 0 }
T{ ##branch }
} 3 test-bb
V{
T{ ##call f >float }
T{ ##branch }
} 4 test-bb
V{
T{ ##inc-r f -1 }
T{ ##inc-d f 2 }
T{ ##peek f 27 R -1 }
T{ ##peek f 28 D 2 }
T{ ##peek f 29 D 3 }
T{ ##load-integer f 30 1 }
T{ ##load-integer f 31 0 }
T{ ##compare-imm-branch f 27 f cc/= }
} 5 test-bb
V{
T{ ##inc-d f -1 }
T{ ##branch }
} 6 test-bb
V{
T{ ##inc-d f -1 }
T{ ##branch }
} 7 test-bb
V{
T{ ##phi f 36 H{ { 6 30 } { 7 31 } } }
T{ ##inc-d f -2 }
T{ ##unbox f 37 29 "alien_offset" int-rep }
T{ ##unbox f 38 28 "to_double" double-rep }
T{ ##unbox f 39 36 "to_cell" int-rep }
T{ ##alien-invoke f V{ } V{ { 37 int-rep 0 } { 38 double-rep 4 } { 39 int-rep 12 } } { { 40 int-rep EAX } } 0 16 "CFRunLoopRunInMode" f T{ gc-map } }
T{ ##box f 41 40 "from_signed_cell" int-rep T{ gc-map } }
T{ ##replace f 41 D 0 }
T{ ##branch }
} 8 test-bb
V{
T{ ##epilogue }
T{ ##return }
} 9 test-bb
0 1 edge
1 2 edge
2 3 edge
3 4 edge
4 5 edge
5 { 6 7 } edges
6 8 edge
7 8 edge
8 9 edge
[ ] [ test-ssa-liveness ] unit-test
[ H{ { 28 28 } { 29 29 } { 30 30 } { 31 31 } } ] [ 5 get live-out ] unit-test
[ H{ { 28 28 } { 29 29 } { 30 30 } } ] [ 6 get live-in ] unit-test
[ H{ { 28 28 } { 29 29 } { 31 31 } } ] [ 7 get live-in ] unit-test
[ H{ { 30 30 } } ] [ 6 get 8 get edge-live-in ] unit-test

View File

@ -62,3 +62,20 @@ V{
] [
0 get instructions>>
] unit-test
V{
T{ ##phi }
T{ ##box }
} 0 test-bb
0 get insert-save-context
[
V{
T{ ##phi }
T{ ##save-context f 7 8 }
T{ ##box }
}
] [
0 get instructions>>
] unit-test

View File

@ -18,6 +18,7 @@ M: insn needs-save-context? drop f ;
GENERIC: modifies-context? ( insn -- ? )
M: ##phi modifies-context? drop t ;
M: ##inc-d modifies-context? drop t ;
M: ##inc-r modifies-context? drop t ;
M: ##callback-inputs modifies-context? drop t ;

View File

@ -236,6 +236,7 @@ CODEGEN: ##box-alien %box-alien
CODEGEN: ##box-displaced-alien %box-displaced-alien
CODEGEN: ##unbox-alien %unbox-alien
CODEGEN: ##unbox-any-c-ptr %unbox-any-c-ptr
CODEGEN: ##convert-integer %convert-integer
CODEGEN: ##load-memory %load-memory
CODEGEN: ##load-memory-imm %load-memory-imm
CODEGEN: ##store-memory %store-memory

View File

@ -6,7 +6,7 @@ math memory namespaces namespaces.private parser
quotations sequences specialized-arrays stack-checker
stack-checker.errors system threads tools.test words
alien.complex concurrency.promises alien.data
byte-arrays classes ;
byte-arrays classes compiler.test ;
FROM: alien.c-types => float short ;
SPECIALIZED-ARRAY: float
SPECIALIZED-ARRAY: char
@ -804,3 +804,20 @@ mingw? [
] with-out-parameters ;
[ 12 ] [ 6 out-param-callback out-param-indirect ] unit-test
! Alias analysis regression
: aa-callback-1 ( -- c )
double { } cdecl [ 5.0 ] alien-callback ;
: aa-indirect-1 ( c -- x )
double { } cdecl alien-indirect ; inline
TUPLE: some-tuple x ;
[ T{ some-tuple f 5.0 } ] [
[
some-tuple new
aa-callback-1
aa-indirect-1 >>x
] compile-call
] unit-test

View File

@ -105,3 +105,24 @@ IN: compiler.tests.low-level-ir
T{ ##add-imm f 0 0 -16 }
} compile-test-bb
] unit-test
[ -1 ] [
V{
T{ ##load-tagged f 1 $[ -1 tag-fixnum ] }
T{ ##convert-integer f 0 1 char }
} compile-test-bb
] unit-test
[ -1 ] [
V{
T{ ##load-tagged f 1 $[ -1 9 2^ bitxor tag-fixnum ] }
T{ ##convert-integer f 0 1 char }
} compile-test-bb
] unit-test
[ $[ 255 tag-bits get neg shift ] ] [
V{
T{ ##load-tagged f 1 $[ -1 9 2^ bitxor tag-fixnum ] }
T{ ##convert-integer f 0 1 uchar }
} compile-test-bb
] unit-test

View File

@ -1,7 +1,7 @@
USING: compiler.test compiler.units tools.test kernel kernel.private
sequences.private math.private math combinators strings alien
arrays memory vocabs parser eval quotations compiler.errors
definitions ;
definitions generic.single ;
IN: compiler.tests.simple
! Test empty word
@ -249,3 +249,6 @@ M: quotation bad-effect-test call ; inline
! Don't want compiler error to stick around
[ ] [ [ M\ quotation bad-effect-test forget ] with-compilation-unit ] unit-test
! Make sure time bombs literalize
[ [ \ + call ] compile-call ] [ no-method? ] must-fail-with

View File

@ -8,3 +8,9 @@ TUPLE: color red green blue ;
[ T{ color f f f f } ]
[ [ color new ] compile-call ] unit-test
SYMBOL: foo
[ [ foo new ] compile-call ] must-fail
[ [ foo boa ] compile-call ] must-fail

View File

@ -1,8 +1,9 @@
! Copyright (C) 2008, 2009 Slava Pestov.
! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel accessors sequences words memoize combinators
classes classes.builtin classes.tuple classes.singleton
math.partial-dispatch fry assocs combinators.short-circuit
stack-checker.dependencies
compiler.tree
compiler.tree.combinators
compiler.tree.propagation.info
@ -26,6 +27,9 @@ GENERIC: finalize* ( node -- nodes )
: splice-final ( quot -- nodes ) splice-quot finalize ;
: splice-predicate ( word -- nodes )
[ depends-on-definition ] [ def>> splice-final ] bi ;
M: #copy finalize* drop f ;
M: #shuffle finalize*
@ -44,8 +48,8 @@ GENERIC: finalize-word ( #call word -- nodes )
M: predicate finalize-word
"predicating" word-prop {
{ [ dup builtin-class? ] [ drop word>> cached-expansion ] }
{ [ dup tuple-class? ] [ drop word>> def>> splice-final ] }
{ [ dup singleton-class? ] [ drop word>> def>> splice-final ] }
{ [ dup tuple-class? ] [ drop word>> splice-predicate ] }
{ [ dup singleton-class? ] [ drop word>> splice-predicate ] }
[ drop ]
} cond ;

View File

@ -473,6 +473,8 @@ HOOK: %unbox-any-c-ptr cpu ( dst src -- )
HOOK: %box-alien cpu ( dst src temp -- )
HOOK: %box-displaced-alien cpu ( dst displacement base temp base-class -- )
HOOK: %convert-integer cpu ( dst src c-type -- )
HOOK: %load-memory cpu ( dst base displacement scale offset rep c-type -- )
HOOK: %load-memory-imm cpu ( dst base offset rep c-type -- )
HOOK: %store-memory cpu ( value base displacement scale offset rep c-type -- )

View File

@ -209,6 +209,8 @@ M:: x86.32 %binary-float-function ( dst src1 src2 func -- )
#! MINGW ABI incompatibility disaster
[ large-struct? ] [ mingw eq? os windows? not or ] bi* and ;
M: x86.32 %prepare-var-args ( -- ) ;
M:: x86.32 stack-cleanup ( stack-size return abi -- n )
#! a) Functions which are stdcall/fastcall/thiscall have to
#! clean up the caller's stack frame.

View File

@ -140,6 +140,8 @@ M:: x86.64 %binary-float-function ( dst src1 src2 func -- )
func "libm" load-library f %c-invoke
dst double-rep %load-return ;
M: x86.64 %prepare-var-args ( -- ) RAX RAX XOR ;
M: x86.64 stack-cleanup 3drop 0 ;
M: x86.64 %cleanup 0 assert= ;

View File

@ -345,6 +345,29 @@ M: x86.64 has-small-reg? 2drop t ;
[ quot call ] with-save/restore
] if ; inline
:: (%convert-integer) ( dst src bits quot -- )
dst { src } bits [| new-dst |
new-dst src int-rep %copy
new-dst dup bits n-bit-version-of quot call
dst new-dst int-rep %copy
] with-small-register ; inline
: %zero-extend ( dst src bits -- )
[ MOVZX ] (%convert-integer) ; inline
: %sign-extend ( dst src bits -- )
[ MOVSX ] (%convert-integer) ; inline
M: x86 %convert-integer ( dst src c-type -- )
{
{ c:char [ 8 %sign-extend ] }
{ c:uchar [ 8 %zero-extend ] }
{ c:short [ 16 %sign-extend ] }
{ c:ushort [ 16 %zero-extend ] }
{ c:int [ 32 %sign-extend ] }
{ c:uint [ 32 [ 2drop ] (%convert-integer) ] }
} case ;
:: %alien-integer-getter ( dst exclude address bits quot -- )
dst exclude bits [| new-dst |
new-dst dup bits n-bit-version-of dup address MOV
@ -621,6 +644,7 @@ HOOK: %cleanup cpu ( n -- )
:: emit-alien-insn ( reg-inputs stack-inputs reg-outputs cleanup stack-size quot -- )
stack-inputs [ first3 %store-stack-param ] each
reg-inputs [ first3 %store-reg-param ] each
%prepare-var-args
quot call
cleanup %cleanup
reg-outputs [ first3 %load-reg-param ] each ; inline

View File

@ -18,6 +18,8 @@ TYPEDEF: guint32 GdkNativeWindow
TYPEDEF: guint32 GdkWChar
C-TYPE: GdkXEvent
REPLACE-C-TYPE: any gpointer
IMPLEMENT-STRUCTS: GdkEventAny GdkEventKey GdkEventButton
GdkEventScroll GdkEventMotion GdkEventExpose GdkEventVisibility
GdkEventCrossing GdkEventFocus GdkEventConfigure GdkEventProperty

View File

@ -13,8 +13,6 @@ IN: glib.ffi
} cond
>>
<< double "long double" current-vocab create typedef >>
TYPEDEF: char gchar
TYPEDEF: uchar guchar
TYPEDEF: short gshort
@ -65,7 +63,9 @@ TYPEDEF: guint32 gunichar
TYPEDEF: guint16 gunichar2
TYPEDEF: gpointer pointer
TYPEDEF: gpointer any
REPLACE-C-TYPE: long\sdouble double
REPLACE-C-TYPE: any gpointer
IMPLEMENT-STRUCTS: GPollFD GSource GSourceFuncs ;

View File

@ -14,4 +14,8 @@ SYMBOL: aliases
aliases [ H{ } ] initialize
SYMBOL: implement-structs
implement-structs [ V{ } ] initialize
SYMBOL: replaced-c-types
replaced-c-types [ H{ } ] initialize

View File

@ -1,6 +1,6 @@
! Copyright (C) 2009 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.parser arrays
USING: accessors alien alien.c-types alien.parser arrays assocs
classes.parser classes.struct combinators
combinators.short-circuit definitions effects fry
gobject-introspection.common gobject-introspection.types kernel
@ -9,7 +9,9 @@ sequences.generalizations words words.constant ;
IN: gobject-introspection.ffi
: string>c-type ( str -- c-type )
parse-c-type ;
dup CHAR: * swap index [ cut ] [ "" ] if*
[ replaced-c-types get-global ?at drop ] dip
append parse-c-type ;
: define-each ( nodes quot -- )
'[ dup @ >>ffi drop ] each ; inline

View File

@ -1,8 +1,8 @@
! Copyright (C) 2009 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs combinators gobject-introspection.common
gobject-introspection.ffi gobject-introspection.loader
kernel lexer locals math namespaces sequences vocabs.parser xml ;
gobject-introspection.ffi gobject-introspection.loader kernel lexer
locals math namespaces sequences strings.parser vocabs.parser xml ;
IN: gobject-introspection
: with-child-vocab ( name quot -- )
@ -19,9 +19,15 @@ IN: gobject-introspection
{
[ define-ffi-repository ]
} cleave
f implement-structs set-global ;
V{ } clone implement-structs set-global
H{ } clone replaced-c-types set-global ;
SYNTAX: GIR: scan define-gir-vocab ;
SYNTAX: IMPLEMENT-STRUCTS:
";" parse-tokens implement-structs set-global ;
";" parse-tokens
implement-structs [ swap append! ] change-global ;
SYNTAX: REPLACE-C-TYPE:
scan unescape-string scan swap
replaced-c-types get-global set-at ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.syntax alien.destructors alien.libraries
combinators kernel literals math system
classes.struct combinators kernel literals math system
gobject-introspection glib.ffi ;
EXCLUDE: alien.c-types => pointer ;
IN: gobject.ffi
@ -18,12 +18,13 @@ TYPEDEF: void* GSignalCMarshaller
TYPEDEF: void GStrv
TYPEDEF: gchar* gchararray
IMPLEMENT-STRUCTS: GValue ;
GIR: vocab:gobject/GObject-2.0.gir
IN: gobject.ffi
FORGET: GValue
STRUCT: GValue { g_type GType } { data guint64[2] } ;
FORGET: GIOCondition
FORGET: G_IO_IN
FORGET: G_IO_OUT

View File

@ -94,7 +94,7 @@ prepare-test-file
test-file now
[ set-file-access-time ] 2keep
[ file-info accessed>> ]
[ [ [ truncate >integer ] change-second ] bi@ ] bi* =
[ [ [ truncate >integer ] change-second >gmt ] bi@ ] bi* =
] unit-test
[ t ]
@ -102,7 +102,7 @@ prepare-test-file
test-file now
[ set-file-modified-time ] 2keep
[ file-info modified>> ]
[ [ [ truncate >integer ] change-second ] bi@ ] bi* =
[ [ [ truncate >integer ] change-second >gmt ] bi@ ] bi* =
] unit-test
[ t ]
@ -110,7 +110,7 @@ prepare-test-file
test-file now [ dup 2array set-file-times ] 2keep
[ file-info [ modified>> ] [ accessed>> ] bi ] dip
3array
[ [ truncate >integer ] change-second ] map all-equal?
[ [ truncate >integer ] change-second >gmt ] map all-equal?
] unit-test
[ ] [ test-file f now 2array set-file-times ] unit-test

View File

@ -103,7 +103,7 @@ USING: math.matrices math.vectors tools.test math ;
[ { 1 0 0 } ] [ { 0 1 0 } { 0 0 1 } cross ] unit-test
[ { 0 1 0 } ] [ { 0 0 1 } { 1 0 0 } cross ] unit-test
[ { 0.0 -0.707 0.707 } ] [ { 1.0 0.0 0.0 } { 0.0 0.707 0.707 } cross ] unit-test
[ { 0 -2 2 } ] [ { -1 -1 -1 } { 1 -1 -1 } cross ] unit-test
[ { 1 0 0 } ] [ { 1 1 0 } { 1 0 0 } proj ] unit-test
[ { { 4181 6765 } { 6765 10946 } } ]

View File

@ -114,6 +114,9 @@ IN: math.matrices
[ [ { 1 2 0 } vshuffle ] [ { 2 0 1 } vshuffle ] bi* v* ]
[ [ { 2 0 1 } vshuffle ] [ { 1 2 0 } vshuffle ] bi* v* ] 2bi v- ; inline
:: normal ( vec1 vec2 vec3 -- vec4 )
vec2 vec1 v- vec3 vec1 v- cross normalize ; inline
: proj ( v u -- w )
[ [ v. ] [ norm-sq ] bi / ] keep n*v ;

View File

@ -616,10 +616,14 @@ STRUCT: simd-struct
! Test cross product
[ float-4{ 0.0 0.0 1.0 0.0 } ] [ float-4{ 1.0 0.0 0.0 0.0 } float-4{ 0.0 1.0 0.0 0.0 } cross ] unit-test
[ float-4{ 0.0 0.0 1.0 0.0 } ] [ float-4{ 1.0 0.0 0.0 0.0 } float-4{ 0.0 1.0 0.0 0.0 } [ { float-4 float-4 } declare cross ] compile-call ] unit-test
[ float-4{ 0.0 -1.0 0.0 0.0 } ] [ float-4{ 1.0 0.0 0.0 0.0 } float-4{ 0.0 0.0 1.0 0.0 } cross ] unit-test
[ float-4{ 0.0 -1.0 0.0 0.0 } ] [ float-4{ 1.0 0.0 0.0 0.0 } float-4{ 0.0 0.0 1.0 0.0 } [ { float-4 float-4 } declare cross ] compile-call ] unit-test
[ double-4{ 0.0 0.0 1.0 0.0 } ] [ double-4{ 1.0 0.0 0.0 0.0 } double-4{ 0.0 1.0 0.0 0.0 } cross ] unit-test
[ double-4{ 0.0 0.0 1.0 0.0 } ] [ double-4{ 1.0 0.0 0.0 0.0 } double-4{ 0.0 1.0 0.0 0.0 } [ { double-4 double-4 } declare cross ] compile-call ] unit-test
[ double-4{ 0.0 -1.0 0.0 0.0 } ] [ double-4{ 1.0 0.0 0.0 0.0 } double-4{ 0.0 0.0 1.0 0.0 } cross ] unit-test
[ double-4{ 0.0 -1.0 0.0 0.0 } ] [ double-4{ 1.0 0.0 0.0 0.0 } double-4{ 0.0 0.0 1.0 0.0 } [ { double-4 double-4 } declare cross ] compile-call ] unit-test
! CSSA bug
[ 4000000 ] [

View File

@ -1,7 +1,5 @@
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: regexp tools.test kernel sequences regexp.parser regexp.private
eval strings multiline accessors ;
USING: arrays regexp tools.test kernel sequences regexp.parser
regexp.private eval strings multiline accessors ;
IN: regexp-tests
[ f ] [ "b" "a*" <regexp> matches? ] unit-test
@ -241,6 +239,9 @@ IN: regexp-tests
[ t ] [ 3 "xabc" R/ abc/r match-index-from >boolean ] unit-test
[ t ] [ 3 "xabc" R/ a[bB][cC]/r match-index-from >boolean ] unit-test
[ 2 ] [ 0 "llamallol" R/ ll/ match-index-from ] unit-test
[ 5 ] [ 8 "lolmallol" R/ lol/r match-index-from ] unit-test
[ t ] [ "s@f" "[a-z.-]@[a-z]" <regexp> matches? ] unit-test
[ f ] [ "a" "[a-z.-]@[a-z]" <regexp> matches? ] unit-test
[ t ] [ ".o" "\\.[a-z]" <regexp> matches? ] unit-test
@ -272,6 +273,10 @@ IN: regexp-tests
[ "b" ] [ "aaaaaaaaaaaaaaaaaaaaaaab" "((a*)*b)*b" <regexp> first-match >string ] unit-test
[ T{ slice { from 5 } { to 10 } { seq "hellohello" } } ]
[ "hellohello" R/ hello/r first-match ]
unit-test
[ { "1" "2" "3" "4" } ]
[ "1ABC2DEF3GHI4" R/ [A-Z]+/ re-split [ >string ] map ] unit-test
@ -282,18 +287,52 @@ IN: regexp-tests
[ { "a" "" } ] [ "a=" R/ =/ re-split [ >string ] map ] unit-test
[ { "he" "o" } ] [ "hello" R/ l+/ re-split [ >string ] map ] unit-test
[ { "h" "llo" } ] [ "hello" R/ e+/ re-split [ >string ] map ] unit-test
[ { "" "h" "" "l" "l" "o" "" } ] [ "hello" R/ e*/ re-split [ >string ] map ] unit-test
[ { { 0 5 "hellohello" } { 5 10 "hellohello" } } ]
[ "hellohello" R/ hello/ [ 3array ] map-matches ]
unit-test
[ { { 5 10 "hellohello" } { 0 5 "hellohello" } } ]
[ "hellohello" R/ hello/r [ 3array ] map-matches ]
unit-test
[ { "ABC" "DEF" "GHI" } ]
[ "1ABC2DEF3GHI4" R/ [A-Z]+/ all-matching-subseqs ] unit-test
[ 3 ]
[ "1ABC2DEF3GHI4" R/ [A-Z]+/ count-matches ] unit-test
[ { "ee" "e" } ] [ "heellohello" R/ e+/ all-matching-subseqs ] unit-test
[ { "e" "ee" } ] [ "heellohello" R/ e+/r all-matching-subseqs ] unit-test
[ 0 ]
[ "123" R/ [A-Z]+/ count-matches ] unit-test
[ 3 ] [ "1ABC2DEF3GHI4" R/ [A-Z]+/ count-matches ] unit-test
[ "1.2.3.4." ]
[ "1ABC2DEF3GHI4JK" R/ [A-Z]+/ "." re-replace ] unit-test
[ 3 ] [ "1ABC2DEF3GHI4" R/ [A-Z]+/r count-matches ] unit-test
[ 1 ] [ "" R/ / count-matches ] unit-test
[ 1 ] [ "" R/ /r count-matches ] unit-test
[ 0 ] [ "123" R/ [A-Z]+/ count-matches ] unit-test
[ 0 ] [ "123" R/ [A-Z]+/r count-matches ] unit-test
[ 6 ] [ "hello" R/ e*/ count-matches ] unit-test
[ 6 ] [ "hello" R/ e*/r count-matches ] unit-test
[ 11 ] [ "hello world" R/ l*/ count-matches ] unit-test
[ 11 ] [ "hello world" R/ l*/r count-matches ] unit-test
[ 1 ] [ "hello" R/ e+/ count-matches ] unit-test
[ 2 ] [ "hello world" R/ l+/r count-matches ] unit-test
[ "1.2.3.4." ] [ "1ABC2DEF3GHI4JK" R/ [A-Z]+/ "." re-replace ] unit-test
[ "XhXXlXlXoX XwXoXrXlXdX" ] [ "hello world" R/ e*/ "X" re-replace ] unit-test
[ "-- title --" ] [ "== title ==" R/ =/ "-" re-replace ] unit-test
[ "" ] [ "ab" "a(?!b)" <regexp> first-match >string ] unit-test

View File

@ -50,33 +50,49 @@ PRIVATE>
<PRIVATE
:: (next-match) ( i string regexp quot: ( i string regexp -- j ) reverse? -- i start end ? )
i string regexp quot call dup [| j |
j i j
reverse? [ swap [ 1 + ] bi@ ] when
string
] [ drop f f f f ] if ; inline
: search-range ( i string reverse? -- seq )
[ drop dup 1 + -1 ] [ length 1 ] if range boa ; inline
[ drop -1 ] [ length ] if [a,b] ; inline
:: next-match ( i string regexp quot: ( i string regexp -- j ) reverse? -- i start end ? )
f f f f
:: (next-match) ( i string regexp quot: ( i string regexp -- j ) reverse? -- start end ? )
i string regexp quot call dup
[| j | reverse? [ j i ] [ i j ] if string ] [ drop f f f ] if ; inline
:: next-match ( i string regexp quot: ( i string regexp -- j ) reverse? -- start end ? )
f f f
i string reverse? search-range
[ [ 2drop 2drop ] dip string regexp quot reverse? (next-match) dup ] find 2drop ; inline
[ [ 3drop ] dip string regexp quot reverse? (next-match) dup ] find 2drop ; inline
: do-next-match ( i string regexp -- i start end ? )
: do-next-match ( i string regexp -- start end ? )
dup next-match>>
execute( i string regexp -- i start end ? ) ; inline
execute( i string regexp -- start end ? ) ; inline
:: (each-match) ( ... i string regexp quot: ( ... start end string -- ... ) -- ... )
i string regexp do-next-match [| i' start end |
start end string quot call
i' string regexp quot (each-match)
] [ 3drop ] if ; inline recursive
:: (each-match-forward) ( ... i string regexp quot: ( ... start end string -- ... ) -- ... )
i string length <= [
i string regexp do-next-match [| start end |
start end string quot call
start end eq? [ end 1 + ] [ end ] if
string regexp quot (each-match-forward)
] [ 2drop ] if
] when ; inline recursive
:: (each-match-backward) ( ... i string regexp quot: ( ... start end string -- ... ) -- ... )
i -1 >= [
i string regexp do-next-match [| start end |
start 1 + end 1 + string quot call
start end eq? [ start 1 - ] [ start ] if
string regexp quot (each-match-backward)
] [ 2drop ] if
] when ; inline recursive
: (each-match) ( ... i string regexp quot: ( ... start end string -- ... ) -- ... )
over reverse-regexp? [ (each-match-backward) ] [ (each-match-forward) ] if ; inline
GENERIC: match-iterator-start ( string regexp -- start )
M: regexp match-iterator-start 2drop 0 ;
M: reverse-regexp match-iterator-start drop length ;
: prepare-match-iterator ( string regexp -- i string regexp )
[ check-string ] dip [ end/start nip ] 2keep ; inline
[ check-string ] dip [ match-iterator-start ] 2keep ; inline
PRIVATE>
@ -107,12 +123,14 @@ PRIVATE>
PRIVATE>
: first-match ( string regexp -- slice/f )
[ prepare-match-iterator do-next-match ] [ drop ] 2bi
'[ _ slice boa nip ] [ 3drop f ] if ;
:: first-match ( string regexp -- slice/f )
string regexp prepare-match-iterator do-next-match [
regexp reverse-regexp? [ [ 1 + ] bi@ ] when
string slice boa
] [ 2drop f ] if ;
: re-contains? ( string regexp -- ? )
prepare-match-iterator do-next-match [ 3drop ] dip >boolean ;
prepare-match-iterator do-next-match [ 2drop ] dip >boolean ;
: re-split ( string regexp -- seq )
[ slice boa ] (re-split) ;
@ -141,7 +159,7 @@ M: reverse-regexp compile-regexp ( regexp -- regexp )
DEFER: compile-next-match
: next-initial-word ( i string regexp -- i start end string )
: next-initial-word ( i string regexp -- start end string )
[ compile-next-match ] with-compilation-unit do-next-match ;
: compile-next-match ( regexp -- regexp )
@ -149,7 +167,7 @@ DEFER: compile-next-match
dup \ next-initial-word = [
drop _ [ compile-regexp dfa>> def>> ] [ reverse-regexp? ] bi
'[ { array-capacity string regexp } declare _ _ next-match ]
(( i string regexp -- i start end string )) define-temp
(( i string regexp -- start end string )) define-temp
] when
] change-next-match ;

View File

@ -110,13 +110,11 @@ M: object apply-object push-literal ;
infer-quot-here
] dip recursive-state set ;
: time-bomb ( error -- )
'[ _ throw ] infer-quot-here ;
: time-bomb-quot ( obj generic -- quot )
[ literalize ] [ "default-method" word-prop ] bi* [ ] 2sequence ;
ERROR: bad-call obj ;
M: bad-call summary
drop "call must be given a callable" ;
: time-bomb ( obj generic -- )
time-bomb-quot infer-quot-here ;
: infer-literal-quot ( literal -- )
dup recursive-quotation? [
@ -127,7 +125,7 @@ M: bad-call summary
[ [ recursion>> ] keep add-local-quotation ]
bi infer-quot
] [
value>> \ bad-call boa time-bomb
value>> \ call time-bomb
] if
] if ;

View File

@ -156,17 +156,12 @@ M: object infer-call* \ call bad-macro-input ;
\ compose [ infer-compose ] "special" set-word-prop
ERROR: bad-executable obj ;
M: bad-executable summary
drop "execute must be given a word" ;
: infer-execute ( -- )
pop-literal nip
dup word? [
apply-object
] [
\ bad-executable boa time-bomb
\ execute time-bomb
] if ;
\ execute [ infer-execute ] "special" set-word-prop

View File

@ -145,7 +145,9 @@ IN: stack-checker.transforms
[ depends-on-tuple-layout ]
[ [ "boa-check" word-prop [ ] or ] dip ] 2bi
'[ @ _ <tuple-boa> ]
] [ drop f ] if
] [
\ boa time-bomb
] if
] 1 define-transform
\ boa t "no-compile" set-word-prop

View File

@ -106,12 +106,12 @@ M: f >label drop <gadget> ;
{ 5 5 } >>gap ; inline
PRIVATE>
: label-on-left ( gadget label -- button )
: label-on-left ( gadget label -- track )
label-on-left/right
swap >label f track-add
swap 1 track-add ;
: label-on-right ( label gadget -- button )
: label-on-right ( label gadget -- track )
label-on-left/right
swap f track-add
swap >label 1 track-add ;

View File

@ -129,6 +129,7 @@ M: world request-focus-on ( child gadget -- )
[ T{ rgba f 1.0 1.0 1.0 1.0 } ] if ;
GENERIC# apply-world-attributes 1 ( world attributes -- world )
M: world apply-world-attributes
{
[ title>> >>title ]
@ -166,15 +167,11 @@ flush-layout-cache-hook [ [ ] ] initialize
GENERIC: begin-world ( world -- )
GENERIC: end-world ( world -- )
GENERIC: resize-world ( world -- )
M: world begin-world
drop ;
M: world end-world
drop ;
M: world resize-world
drop ;
M: world begin-world drop ;
M: world end-world drop ;
M: world resize-world drop ;
M: world dim<<
[ call-next-method ]

View File

@ -81,6 +81,9 @@ M: world graft*
[ [ clean-up-broken-window ] [ ui-error ] bi* ] recover
] bi ;
: dispose-window-resources ( world -- )
[ <reversed> [ [ dispose ] when* ] each V{ } clone ] change-window-resources drop ;
M: world ungraft*
{
[ set-gl-context ]
@ -89,9 +92,9 @@ M: world ungraft*
[ hand-clicked close-global ]
[ hand-gadget close-global ]
[ end-world ]
[ [ <reversed> [ [ dispose ] when* ] each V{ } clone ] change-window-resources drop ]
[ [ (close-window) f ] change-handle drop ]
[ dispose-window-resources ]
[ unfocus-world ]
[ [ (close-window) f ] change-handle drop ]
[ promise>> t swap fulfill ]
} cleave ;

View File

@ -273,8 +273,14 @@ test-server-slot-values
! Dynamically changing inheritance hierarchy
TUPLE: electronic-device ;
: computer?' ( a -- b ) computer? ;
[ t ] [ laptop new computer?' ] unit-test
[ ] [ "IN: classes.tuple.tests TUPLE: computer < electronic-device cpu ram ; C: <computer> computer C: <laptop> laptop C: <server> server" eval( -- ) ] unit-test
[ t ] [ laptop new computer?' ] unit-test
[ f ] [ electronic-device laptop class<= ] unit-test
[ t ] [ server electronic-device class<= ] unit-test
[ t ] [ laptop server class-or electronic-device class<= ] unit-test

27859
extra/clutter/Clutter-1.0.gir Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: clutter.ffi ;
IN: clutter

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: clutter.cogl.ffi ;
IN: clutter.cogl

View File

@ -0,0 +1,25 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries alien.syntax
combinators kernel opengl.gl system
gobject-introspection glib.ffi ;
IN: clutter.cogl.ffi
<<
"clutter.cogl" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
} cond
>>
TYPEDEF: int CoglAngle
TYPEDEF: int CoglFixed
TYPEDEF: void* CoglHandle
REPLACE-C-TYPE: unsigned\schar uchar
REPLACE-C-TYPE: unsigned\sint uint
REPLACE-C-TYPE: unsigned\slong ulong
GIR: vocab:clutter/cogl/Cogl-1.0.gir

View File

@ -0,0 +1,20 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries cairo.ffi
combinators kernel system
gobject-introspection clutter.cogl.ffi clutter.json.ffi
glib.ffi gobject.ffi pango.ffi ;
IN: clutter.ffi
<<
"clutter" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
} cond
>>
IMPLEMENT-STRUCTS: ClutterVertex ;
GIR: vocab:clutter/Clutter-1.0.gir

View File

@ -0,0 +1,809 @@
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.0"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="Atk" version="1.0"/>
<include name="Clutter" version="1.0"/>
<include name="ClutterJson" version="1.0"/>
<include name="Cogl" version="1.0"/>
<include name="GL" version="1.0"/>
<include name="GLib" version="2.0"/>
<include name="GModule" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gdk" version="2.0"/>
<include name="GdkPixbuf" version="2.0"/>
<include name="Gio" version="2.0"/>
<include name="Gtk" version="2.0"/>
<include name="Pango" version="1.0"/>
<include name="PangoCairo" version="1.0"/>
<include name="PangoFT2" version="1.0"/>
<include name="cairo" version="1.0"/>
<include name="fontconfig" version="2.0"/>
<include name="freetype2" version="2.0"/>
<package name="clutter-1.0"/>
<package name="gobject-2.0"/>
<package name="gtk+-2.0"/>
<namespace name="GtkClutter"
version="0.10"
shared-library="libclutter-gtk-0.10.so.0"
c:prefix="GtkClutter">
<enumeration name="ClutterGtkInitError"
doc="Extension of the #ClutterInitError enumeration for the integration
with GTK+"
version="0.8"
c:type="ClutterGtkInitError">
<member name="last" value="-3" c:identifier="CLUTTER_INIT_ERROR_LAST"/>
<member name="gtk" value="-4" c:identifier="CLUTTER_INIT_ERROR_GTK"/>
</enumeration>
<enumeration name="ClutterGtkTextureError"
doc="An enumeration of error types used in ClutterGtk texture functions"
version="0.10"
c:type="ClutterGtkTextureError">
<member name="invalid_stock_id"
value="0"
c:identifier="CLUTTER_GTK_TEXTURE_INVALID_STOCK_ID"/>
<member name="error_last"
value="1"
c:identifier="CLUTTER_GTK_TEXTURE_ERROR_LAST"/>
</enumeration>
<class name="Embed"
c:type="GtkClutterEmbed"
doc="A #GtkWidget containing the default Clutter stage."
version="0.6"
parent="Gtk.Container"
glib:type-name="GtkClutterEmbed"
glib:get-type="gtk_clutter_embed_get_type"
glib:type-struct="EmbedClass">
<implements name="Atk.ImplementorIface"/>
<implements name="Gtk.Buildable"/>
<constructor name="new"
c:identifier="gtk_clutter_embed_new"
doc="Creates a new #GtkClutterEmbed widget. This widget can be
used to build a scene using Clutter API into a GTK+ application."
version="0.6">
<return-value transfer-ownership="full">
<type name="Embed" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_stage"
c:identifier="gtk_clutter_embed_get_stage"
doc="Retrieves the #ClutterStage from @embed. The returned stage can be
used to add actors to the Clutter scene. Multiple calls to this function
on the same #GtkClutterEmbed widget will return the same stage.
or unref the returned actor."
version="0.6">
<return-value transfer-ownership="none"
doc="a #ClutterStage. You should never destroy">
<type name="Clutter.Actor" c:type="ClutterActor*"/>
</return-value>
</method>
<field name="parent_instance">
<type name="Gtk.Container" c:type="GtkContainer"/>
</field>
<field name="priv">
<type name="EmbedPrivate" c:type="GtkClutterEmbedPrivate*"/>
</field>
</class>
<record name="EmbedClass"
c:type="GtkClutterEmbedClass"
glib:is-gtype-struct-for="Embed"
doc="Base class for #GtkClutterEmbed."
version="0.6">
<field name="parent_class">
<type name="Gtk.ContainerClass" c:type="GtkContainerClass"/>
</field>
<field name="clutter_gtk_reserved1">
<callback name="clutter_gtk_reserved1" c:type="_clutter_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="clutter_gtk_reserved2">
<callback name="clutter_gtk_reserved2" c:type="_clutter_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="clutter_gtk_reserved3">
<callback name="clutter_gtk_reserved3" c:type="_clutter_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="clutter_gtk_reserved4">
<callback name="clutter_gtk_reserved4" c:type="_clutter_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="clutter_gtk_reserved5">
<callback name="clutter_gtk_reserved5" c:type="_clutter_gtk_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="clutter_gtk_reserved6">
<callback name="clutter_gtk_reserved6" c:type="_clutter_gtk_reserved6">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="EmbedPrivate" c:type="GtkClutterEmbedPrivate">
</record>
<interface name="Scrollable"
c:type="GtkClutterScrollable"
glib:type-name="GtkClutterScrollable"
glib:get-type="gtk_clutter_scrollable_get_type"
glib:type-struct="ScrollableIface">
<virtual-method name="set_adjustments" invoker="set_adjustments">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="h_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="v_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_adjustments" invoker="get_adjustments">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="h_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment**"/>
</parameter>
<parameter name="v_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment**"/>
</parameter>
</parameters>
</virtual-method>
<method name="set_adjustments"
c:identifier="gtk_clutter_scrollable_set_adjustments"
doc="Sets the horizontal and vertical adjustments used to determine
the position of the scrollable actor."
version="0.10">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="h_adjust"
transfer-ownership="none"
allow-none="1"
doc="a #GtkAdjustment, or %NULL">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="v_adjust"
transfer-ownership="none"
allow-none="1"
doc="a #GtkAdjustment, or %NULL">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="get_adjustments"
c:identifier="gtk_clutter_scrollable_get_adjustments"
doc="Retrieves the horizontal and vertical adjustments used to
determine the position of the scrollable actor."
version="0.10">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="h_adjust"
direction="out"
caller-allocates="0"
transfer-ownership="full"
doc="return location for a #GtkAdjustment, or %NULL">
<type name="Gtk.Adjustment" c:type="GtkAdjustment**"/>
</parameter>
<parameter name="v_adjust"
direction="out"
caller-allocates="0"
transfer-ownership="full"
doc="return location for a #GtkAdjustment, or %NULL">
<type name="Gtk.Adjustment" c:type="GtkAdjustment**"/>
</parameter>
</parameters>
</method>
<property name="hadjustment"
version="0.10"
writable="1"
construct="1"
doc="The #GtkAdjustment that determines the value of the
horizontal position for this scrollable actor.">
<type name="Gtk.Adjustment" c:type="GtkAdjustment"/>
</property>
<property name="vadjustment"
version="0.10"
writable="1"
construct="1"
doc="The #GtkAdjustment that determines the value of the
vertical position for this scrollable actor.">
<type name="Gtk.Adjustment" c:type="GtkAdjustment"/>
</property>
</interface>
<record name="ScrollableIface"
c:type="GtkClutterScrollableIface"
glib:is-gtype-struct-for="Scrollable"
doc="The #GtkClutterScrollableIface structure contains only private data
and should be accessed using the provided functions."
version="0.10">
<field name="parent_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="set_adjustments">
<callback name="set_adjustments" c:type="set_adjustments">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="scrollable" transfer-ownership="none">
<type name="Scrollable" c:type="GtkClutterScrollable*"/>
</parameter>
<parameter name="h_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="v_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_adjustments">
<callback name="get_adjustments" c:type="get_adjustments">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="scrollable" transfer-ownership="none">
<type name="Scrollable" c:type="GtkClutterScrollable*"/>
</parameter>
<parameter name="h_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment**"/>
</parameter>
<parameter name="v_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment**"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="Viewport"
c:type="GtkClutterViewport"
doc="The #GtkClutterViewport structure contains only private data and
should be accessed using the provided functions."
version="0.8.2"
parent="Clutter.Actor"
glib:type-name="GtkClutterViewport"
glib:get-type="gtk_clutter_viewport_get_type"
glib:type-struct="ViewportClass">
<implements name="Clutter.Container"/>
<implements name="Clutter.Scriptable"/>
<implements name="Scrollable"/>
<implements name="Zoomable"/>
<constructor name="new"
c:identifier="gtk_clutter_viewport_new"
doc="Creates a new #GtkClutterViewport with the given adjustments."
version="0.10">
<return-value transfer-ownership="full">
<type name="Viewport" c:type="ClutterActor*"/>
</return-value>
<parameters>
<parameter name="h_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="v_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="z_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</constructor>
<method name="get_origin"
c:identifier="gtk_clutter_viewport_get_origin"
doc="Retrieves the current translation factor (&quot;origin&quot;) used when
displaying the child of @viewport."
version="0.10">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x"
direction="out"
caller-allocates="0"
transfer-ownership="full">
<type name="float" c:type="gfloat*"/>
</parameter>
<parameter name="y"
direction="out"
caller-allocates="0"
transfer-ownership="full">
<type name="float" c:type="gfloat*"/>
</parameter>
<parameter name="z"
direction="out"
caller-allocates="0"
transfer-ownership="full">
<type name="float" c:type="gfloat*"/>
</parameter>
</parameters>
</method>
<property name="child"
version="0.10"
writable="1"
doc="The #ClutterActor inside the viewport.">
<type name="Clutter.Actor" c:type="ClutterActor"/>
</property>
<property name="origin"
version="0.10"
doc="The current origin of the viewport. You should use the
vertex to convert event coordinates for the child of the
viewport.">
<type name="Clutter.Vertex" c:type="ClutterVertex"/>
</property>
<field name="parent_instance">
<type name="Clutter.Actor" c:type="ClutterActor"/>
</field>
<field name="priv">
<type name="ViewportPrivate" c:type="GtkClutterViewportPrivate*"/>
</field>
</class>
<record name="ViewportClass"
c:type="GtkClutterViewportClass"
glib:is-gtype-struct-for="Viewport"
doc="The #GtkClutterViewportClass structure contains only private data and
should be accessed using the provided functions."
version="0.8.2">
<field name="parent_class">
<type name="Clutter.ActorClass" c:type="ClutterActorClass"/>
</field>
</record>
<record name="ViewportPrivate" c:type="GtkClutterViewportPrivate">
</record>
<interface name="Zoomable"
c:type="GtkClutterZoomable"
glib:type-name="GtkClutterZoomable"
glib:get-type="gtk_clutter_zoomable_get_type"
glib:type-struct="ZoomableIface">
<virtual-method name="set_adjustment" invoker="set_adjustment">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="z_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_adjustment" invoker="get_adjustment">
<return-value transfer-ownership="full">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</return-value>
</virtual-method>
<method name="set_adjustment"
c:identifier="gtk_clutter_zoomable_set_adjustment"
doc="Sets the adjustment used to determine the zoom factor of
the zoomable actor"
version="0.10">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="z_adjust"
transfer-ownership="none"
allow-none="1"
doc="a #GtkAdjustment, or %NULL">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="get_adjustment"
c:identifier="gtk_clutter_zoomable_get_adjustment"
doc="Retrieves the adjustment used to determine the zoom factor of
the zoomable actor"
version="0.10">
<return-value transfer-ownership="none" doc="a #GtkAdjustment">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</return-value>
</method>
<property name="zadjustment"
version="0.10"
writable="1"
construct="1"
doc="The #GtkAdjustment that determines the value of
the zoom factor for this zoomable actor">
<type name="Gtk.Adjustment" c:type="GtkAdjustment"/>
</property>
</interface>
<record name="ZoomableIface"
c:type="GtkClutterZoomableIface"
glib:is-gtype-struct-for="Zoomable"
doc="The #GtkClutterZoomableIface structure contains only private data"
version="1.0">
<field name="parent_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="set_adjustment">
<callback name="set_adjustment" c:type="set_adjustment">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="zoomable" transfer-ownership="none">
<type name="Zoomable" c:type="GtkClutterZoomable*"/>
</parameter>
<parameter name="z_adjust" transfer-ownership="none">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_adjustment">
<callback name="get_adjustment" c:type="get_adjustment">
<return-value transfer-ownership="full">
<type name="Gtk.Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<parameter name="zoomable" transfer-ownership="none">
<type name="Zoomable" c:type="GtkClutterZoomable*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<function name="get_base_color"
c:identifier="gtk_clutter_get_base_color"
doc="Retrieves the base color of @widget for the given @state and copies it
into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="get_bg_color"
c:identifier="gtk_clutter_get_bg_color"
doc="Retrieves the background color of @widget for the given @state and copies
it into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="get_dark_color"
c:identifier="gtk_clutter_get_dark_color"
doc="Retrieves the dark color of @widget for the given @state and copies it
into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="get_fg_color"
c:identifier="gtk_clutter_get_fg_color"
doc="Retrieves the foreground color of @widget for the given @state and copies
it into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="get_light_color"
c:identifier="gtk_clutter_get_light_color"
doc="Retrieves the light color of @widget for the given @state and copies it
into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="get_mid_color"
c:identifier="gtk_clutter_get_mid_color"
doc="Retrieves the mid color of @widget for the given @state and copies it
into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="get_text_aa_color"
c:identifier="gtk_clutter_get_text_aa_color"
doc="Retrieves the text-aa color of @widget for the given @state and copies it
into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="get_text_color"
c:identifier="gtk_clutter_get_text_color"
doc="Retrieves the text color of @widget for the given @state and copies it
into @color."
version="0.8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<type name="Gtk.StateType" c:type="GtkStateType"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
<function name="init"
c:identifier="gtk_clutter_init"
doc="This function should be called instead of clutter_init() and
gtk_init().
on failure."
version="0.8">
<return-value transfer-ownership="full">
<type name="Clutter.InitError" c:type="ClutterInitError"/>
</return-value>
<parameters>
<parameter name="argc"
direction="out"
caller-allocates="0"
transfer-ownership="full">
<type name="int" c:type="int*"/>
</parameter>
<parameter name="argv" transfer-ownership="none">
<type name="utf8" c:type="char***"/>
</parameter>
</parameters>
</function>
<function name="init_with_args"
c:identifier="gtk_clutter_init_with_args"
doc="This function should be called instead of clutter_init() and
gtk_init_with_args().
on failure."
version="0.10"
throws="1">
<return-value transfer-ownership="full">
<type name="Clutter.InitError" c:type="ClutterInitError"/>
</return-value>
<parameters>
<parameter name="argc"
direction="out"
caller-allocates="0"
transfer-ownership="full">
<type name="int" c:type="int*"/>
</parameter>
<parameter name="argv" transfer-ownership="none">
<type name="utf8" c:type="char***"/>
</parameter>
<parameter name="parameter_string"
transfer-ownership="none"
doc=" the first line of &lt;option&gt;--help&lt;/option&gt; output, after &lt;literal&gt;&lt;replaceable&gt;programname&lt;/replaceable&gt; [OPTION...]&lt;/literal&gt;">
<type name="utf8" c:type="char*"/>
</parameter>
<parameter name="entries"
transfer-ownership="none"
doc=" describing the options of your program">
<type name="GLib.OptionEntry" c:type="GOptionEntry*"/>
</parameter>
<parameter name="translation_domain"
transfer-ownership="none"
doc=" the &lt;option&gt;--help&lt;/option&gt; output for the options in @entries with gettext(), or %NULL">
<type name="utf8" c:type="char*"/>
</parameter>
</parameters>
</function>
<function name="texture_new_from_icon_name"
c:identifier="gtk_clutter_texture_new_from_icon_name"
doc="Creates a new #ClutterTexture and sets its contents to be
the @icon_name from the current icon theme.
was %NULL and @icon_name was not found."
version="0.8">
<return-value transfer-ownership="full">
<type name="Clutter.Actor" c:type="ClutterActor*"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="icon_name" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<type name="Gtk.IconSize" c:type="GtkIconSize"/>
</parameter>
</parameters>
</function>
<function name="texture_new_from_pixbuf"
c:identifier="gtk_clutter_texture_new_from_pixbuf"
doc="Creates a new #ClutterTexture and sets its contents with a copy
of @pixbuf."
version="0.8">
<return-value transfer-ownership="full">
<type name="Clutter.Actor" c:type="ClutterActor*"/>
</return-value>
<parameters>
<parameter name="pixbuf" transfer-ownership="none">
<type name="GdkPixbuf.Pixbuf" c:type="GdkPixbuf*"/>
</parameter>
</parameters>
</function>
<function name="texture_new_from_stock"
c:identifier="gtk_clutter_texture_new_from_stock"
doc="Creates a new #ClutterTexture and sets its contents using the stock
icon @stock_id as rendered by @widget."
version="0.8">
<return-value transfer-ownership="full">
<type name="Clutter.Actor" c:type="ClutterActor*"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="stock_id" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<type name="Gtk.IconSize" c:type="GtkIconSize"/>
</parameter>
</parameters>
</function>
<function name="texture_set_from_icon_name"
c:identifier="gtk_clutter_texture_set_from_icon_name"
doc="Sets the contents of @texture using the @icon_name from the
current icon theme."
version="0.8"
throws="1">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="texture" transfer-ownership="none">
<type name="Clutter.Texture" c:type="ClutterTexture*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="icon_name" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<type name="Gtk.IconSize" c:type="GtkIconSize"/>
</parameter>
</parameters>
</function>
<function name="texture_set_from_pixbuf"
c:identifier="gtk_clutter_texture_set_from_pixbuf"
doc="Sets the contents of @texture with a copy of @pixbuf."
version="0.8"
throws="1">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="texture" transfer-ownership="none">
<type name="Clutter.Texture" c:type="ClutterTexture*"/>
</parameter>
<parameter name="pixbuf" transfer-ownership="none">
<type name="GdkPixbuf.Pixbuf" c:type="GdkPixbuf*"/>
</parameter>
</parameters>
</function>
<function name="texture_set_from_stock"
c:identifier="gtk_clutter_texture_set_from_stock"
doc="Sets the contents of @texture using the stock icon @stock_id, as
rendered by @widget."
version="0.8"
throws="1">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="texture" transfer-ownership="none">
<type name="Clutter.Texture" c:type="ClutterTexture*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Gtk.Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="stock_id" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<type name="Gtk.IconSize" c:type="GtkIconSize"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>

View File

@ -0,0 +1,18 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries combinators kernel
system
gobject-introspection clutter.ffi gdk.pixbuf.ffi glib.ffi
gtk.ffi ;
IN: clutter.gtk.ffi
<<
"clutter.gtk" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-gtk-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:clutter/gtk/GtkClutter-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: clutter.gtk.ffi ;
IN: clutter.gtk

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.libraries combinators kernel system
gobject-introspection glib.ffi gobject.ffi ;
IN: clutter.json.ffi
<<
"clutter.json" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
} cond
>>
GIR: vocab:clutter/json/ClutterJson-1.0.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: clutter.json.ffi ;
IN: clutter.json

View File

@ -0,0 +1 @@
Clutter binding

View File

@ -1,7 +1,7 @@
! Copyright (C) 2010 Dmitry Shubin.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays continuations gdbm io.directories
io.files.temp kernel sequences sets tools.test ;
io.files.temp kernel sequences sets system tools.test ;
IN: gdbm.tests
: db-path ( -- filename ) "test.db" temp-file ;
@ -12,52 +12,53 @@ IN: gdbm.tests
: with-test.db ( quot -- ) test.db swap with-gdbm ; inline
CLEANUP
os windows? cpu x86.64? and [
CLEANUP
[
test.db reader >>role [ ] with-gdbm
] [ gdbm-file-open-error = ] must-fail-with
[ f ] [ [ "foo" exists? ] with-test.db ] unit-test
[ ] [ [ "foo" 41 insert ] with-test.db ] unit-test
[
db-path [ "foo" 42 insert ] with-gdbm-writer
] [ gdbm-cannot-replace = ] must-fail-with
[ ]
[
[
"foo" 42 replace
"bar" 43 replace
"baz" 44 replace
] with-test.db
] unit-test
test.db reader >>role [ ] with-gdbm
] [ gdbm-file-open-error = ] must-fail-with
[ 42 t ] [ db-path [ "foo" fetch* ] with-gdbm-reader ] unit-test
[ f ] [ [ "foo" exists? ] with-test.db ] unit-test
[ f f ] [ [ "unknown" fetch* ] with-test.db ] unit-test
[ ] [ [ "foo" 41 insert ] with-test.db ] unit-test
[
[
300 set-cache-size 300 set-cache-size
] with-test.db
] [ gdbm-option-already-set = ] must-fail-with
db-path [ "foo" 42 insert ] with-gdbm-writer
] [ gdbm-cannot-replace = ] must-fail-with
[ t ]
[
V{ } [ [ 2array append ] each-record ] with-test.db
V{ "foo" "bar" "baz" 42 43 44 } set=
[ ]
[
[
"foo" 42 replace
"bar" 43 replace
"baz" 44 replace
] with-test.db
] unit-test
] unit-test
[ 42 t ] [ db-path [ "foo" fetch* ] with-gdbm-reader ] unit-test
[ f ]
[
test.db newdb >>role [ "foo" exists? ] with-gdbm
] unit-test
[ f f ] [ [ "unknown" fetch* ] with-test.db ] unit-test
[
[
300 set-cache-size 300 set-cache-size
] with-test.db
] [ gdbm-option-already-set = ] must-fail-with
[ t ]
[
V{ } [ [ 2array append ] each-record ] with-test.db
V{ "foo" "bar" "baz" 42 43 44 } set=
] unit-test
[ f ]
[
test.db newdb >>role [ "foo" exists? ] with-gdbm
] unit-test
CLEANUP
CLEANUP
] unless

View File

@ -119,10 +119,6 @@ UNIFORM-TUPLE: loading-uniforms
100000 <uint-vector>
(parse-bunny-model) ; inline
:: normal ( a b c -- normal )
c a v-
b a v- cross normalize ; inline
:: calc-bunny-normal ( a b c vertexes -- )
a b c [ vertexes nth vertex>> ] tri@ normal :> n
a b c [ vertexes nth [ n v+ ] change-normal drop ] tri@ ; inline

View File

@ -0,0 +1,951 @@
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.0"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GLib" version="2.0"/>
<include name="GModule" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gst" version="0.10"/>
<include name="GstBase" version="0.10"/>
<include name="libxml2" version="2.0"/>
<package name="gstreamer-0.10"/>
<package name="gstreamer-base-0.10"/>
<c:include name="gst/app/gstappbuffer.h"/>
<c:include name="gst/app/gstappsink.h"/>
<c:include name="gst/app/gstappsrc.h"/>
<namespace name="GstApp"
version="0.10"
shared-library="libgstapp-0.10.so.0"
c:prefix="Gst">
<record name="AppBuffer" c:type="GstAppBuffer">
<field name="buffer" writable="1">
<type name="Gst.Buffer" c:type="GstBuffer"/>
</field>
<field name="finalize" writable="1">
<type name="AppBufferFinalizeFunc" c:type="GstAppBufferFinalizeFunc"/>
</field>
<field name="priv" writable="1">
<type name="any" c:type="void*"/>
</field>
<constructor name="new" c:identifier="gst_app_buffer_new">
<return-value transfer-ownership="full">
<type name="AppBuffer" c:type="GstBuffer*"/>
</return-value>
<parameters>
<parameter name="data" transfer-ownership="none">
<type name="any" c:type="void*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<type name="int" c:type="int"/>
</parameter>
<parameter name="finalize" transfer-ownership="none" scope="call">
<type name="AppBufferFinalizeFunc"
c:type="GstAppBufferFinalizeFunc"/>
</parameter>
<parameter name="priv" transfer-ownership="none">
<type name="any" c:type="void*"/>
</parameter>
</parameters>
</constructor>
</record>
<record name="AppBufferClass" c:type="GstAppBufferClass">
<field name="buffer_class" writable="1">
<type name="Gst.BufferClass" c:type="GstBufferClass"/>
</field>
</record>
<callback name="AppBufferFinalizeFunc" c:type="GstAppBufferFinalizeFunc">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="priv" transfer-ownership="none">
<type name="any" c:type="void*"/>
</parameter>
</parameters>
</callback>
<class name="AppSink"
c:type="GstAppSink"
parent="GstBase.BaseSink"
glib:type-name="GstAppSink"
glib:get-type="gst_app_sink_get_type"
glib:type-struct="AppSinkClass">
<implements name="Gst.URIHandler"/>
<method name="set_caps"
c:identifier="gst_app_sink_set_caps"
doc="Set the capabilities on the appsink element. This function takes
a copy of the caps structure. After calling this method, the sink will only
accept caps that match @caps. If @caps is non-fixed, you must check the caps
on the buffers to get the actual used caps."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="caps" transfer-ownership="none">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</method>
<method name="get_caps"
c:identifier="gst_app_sink_get_caps"
doc="Get the configured caps on @appsink."
version="0.10.22">
<return-value transfer-ownership="full" doc="after usage.">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
</method>
<method name="is_eos"
c:identifier="gst_app_sink_is_eos"
doc="Check if @appsink is EOS, which is when no more buffers can be pulled because
an EOS event was received.
This function also returns %TRUE when the appsink is not in the PAUSED or
PLAYING state."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
</method>
<method name="set_emit_signals"
c:identifier="gst_app_sink_set_emit_signals"
doc="Make appsink emit the &quot;new-preroll&quot; and &quot;new-buffer&quot; signals. This option is
by default disabled because signal emission is expensive and unneeded when
the application prefers to operate in pull mode."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="emit" transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="get_emit_signals"
c:identifier="gst_app_sink_get_emit_signals"
doc="Check if appsink will emit the &quot;new-preroll&quot; and &quot;new-buffer&quot; signals.
signals."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
</method>
<method name="set_max_buffers"
c:identifier="gst_app_sink_set_max_buffers"
doc="Set the maximum amount of buffers that can be queued in @appsink. After this
amount of buffers are queued in appsink, any more buffers will block upstream
elements until a buffer is pulled from @appsink."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="max" transfer-ownership="none">
<type name="uint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_max_buffers"
c:identifier="gst_app_sink_get_max_buffers"
doc="Get the maximum amount of buffers that can be queued in @appsink."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="uint" c:type="guint"/>
</return-value>
</method>
<method name="set_drop"
c:identifier="gst_app_sink_set_drop"
doc="Instruct @appsink to drop old buffers when the maximum amount of queued
buffers is reached."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="drop" transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="get_drop"
c:identifier="gst_app_sink_get_drop"
doc="Check if @appsink will drop old buffers when the maximum amount of queued
buffers is reached.
filled."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
</method>
<method name="pull_preroll"
c:identifier="gst_app_sink_pull_preroll"
doc="Get the last preroll buffer in @appsink. This was the buffer that caused the
appsink to preroll in the PAUSED state. This buffer can be pulled many times
and remains available to the application even after EOS.
This function is typically used when dealing with a pipeline in the PAUSED
state. Calling this function after doing a seek will give the buffer right
after the seek position.
Note that the preroll buffer will also be returned as the first buffer
when calling gst_app_sink_pull_buffer().
If an EOS event was received before any buffers, this function returns
%NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll buffer or EOS is received or the appsink
element is set to the READY/NULL state."
version="0.10.22">
<return-value transfer-ownership="full">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</return-value>
</method>
<method name="pull_buffer"
c:identifier="gst_app_sink_pull_buffer"
doc="This function blocks until a buffer or EOS becomes available or the appsink
element is set to the READY/NULL state.
This function will only return buffers when the appsink is in the PLAYING
state. All rendered buffers will be put in a queue so that the application
can pull buffers at its own rate. Note that when the application does not
pull buffers fast enough, the queued buffers could consume a lot of memory,
especially when dealing with raw video frames.
If an EOS event was received before any buffers, this function returns
%NULL. Use gst_app_sink_is_eos () to check for the EOS condition."
version="0.10.22">
<return-value transfer-ownership="full">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</return-value>
</method>
<method name="pull_buffer_list"
c:identifier="gst_app_sink_pull_buffer_list"
doc="This function blocks until a buffer list or EOS becomes available or the
appsink element is set to the READY/NULL state.
This function will only return buffer lists when the appsink is in the
PLAYING state. All rendered buffer lists will be put in a queue so that
the application can pull buffer lists at its own rate. Note that when
the application does not pull buffer lists fast enough, the queued buffer
lists could consume a lot of memory, especially when dealing with raw
video frames.
If an EOS event was received before any buffer lists, this function returns
%NULL. Use gst_app_sink_is_eos () to check for the EOS condition.">
<return-value transfer-ownership="full">
<type name="Gst.BufferList" c:type="GstBufferList*"/>
</return-value>
</method>
<method name="set_callbacks"
c:identifier="gst_app_sink_set_callbacks"
doc="Set callbacks which will be executed for each new preroll, new buffer and eos.
This is an alternative to using the signals, it has lower overhead and is thus
less expensive, but also less flexible.
If callbacks are installed, no signals will be emited for performance
reasons."
version="0.10.23">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="callbacks" transfer-ownership="none">
<type name="AppSinkCallbacks" c:type="GstAppSinkCallbacks*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none">
<type name="any" c:type="gpointer"/>
</parameter>
<parameter name="notify" transfer-ownership="none" scope="call">
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<property name="caps" writable="1">
<type name="Gst.Caps" c:type="GstCaps"/>
</property>
<property name="drop" writable="1">
<type name="boolean" c:type="gboolean"/>
</property>
<property name="emit-signals" writable="1">
<type name="boolean" c:type="gboolean"/>
</property>
<property name="eos">
<type name="boolean" c:type="gboolean"/>
</property>
<property name="max-buffers" writable="1">
<type name="uint" c:type="guint"/>
</property>
<field name="basesink">
<type name="GstBase.BaseSink" c:type="GstBaseSink"/>
</field>
<field name="priv">
<type name="AppSinkPrivate" c:type="GstAppSinkPrivate*"/>
</field>
<field name="_gst_reserved">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
<glib:signal name="eos"
doc="Signal that the end-of-stream has been reached. This signal is emited from
the steaming thread.">
<return-value transfer-ownership="full">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="new-buffer"
doc="Signal that a new buffer is available.
This signal is emited from the steaming thread and only when the
&quot;emit-signals&quot; property is %TRUE.
The new buffer can be retrieved with the &quot;pull-buffer&quot; action
signal or gst_app_sink_pull_buffer() either from this signal callback
or from any other thread.
Note that this signal is only emited when the &quot;emit-signals&quot; property is
set to %TRUE, which it is not by default for performance reasons.">
<return-value transfer-ownership="full">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="new-buffer-list"
doc="Signal that a new bufferlist is available.
This signal is emited from the steaming thread and only when the
&quot;emit-signals&quot; property is %TRUE.
The new buffer can be retrieved with the &quot;pull-buffer-list&quot; action
signal or gst_app_sink_pull_buffe_listr() either from this signal callback
or from any other thread.
Note that this signal is only emited when the &quot;emit-signals&quot; property is
set to %TRUE, which it is not by default for performance reasons.">
<return-value transfer-ownership="full">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="new-preroll"
doc="Signal that a new preroll buffer is available.
This signal is emited from the steaming thread and only when the
&quot;emit-signals&quot; property is %TRUE.
The new preroll buffer can be retrieved with the &quot;pull-preroll&quot; action
signal or gst_app_sink_pull_preroll() either from this signal callback
or from any other thread.
Note that this signal is only emited when the &quot;emit-signals&quot; property is
set to %TRUE, which it is not by default for performance reasons.">
<return-value transfer-ownership="full">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="pull-buffer"
doc="This function blocks until a buffer or EOS becomes available or the appsink
element is set to the READY/NULL state.
This function will only return buffers when the appsink is in the PLAYING
state. All rendered buffers will be put in a queue so that the application
can pull buffers at its own rate.
Note that when the application does not pull buffers fast enough, the
queued buffers could consume a lot of memory, especially when dealing with
raw video frames. It&apos;s possible to control the behaviour of the queue with
the &quot;drop&quot; and &quot;max-buffers&quot; properties.
If an EOS event was received before any buffers, this function returns
%NULL. Use gst_app_sink_is_eos () to check for the EOS condition.">
<return-value transfer-ownership="full">
<type name="Gst.Buffer" c:type="GstBuffer"/>
</return-value>
</glib:signal>
<glib:signal name="pull-buffer-list"
doc="This function blocks until a buffer list or EOS becomes available or the appsink
element is set to the READY/NULL state.
This function will only return bufferlists when the appsink is in the PLAYING
state. All rendered bufferlists will be put in a queue so that the application
can pull bufferlists at its own rate.
Note that when the application does not pull bufferlists fast enough, the
queued bufferlists could consume a lot of memory, especially when dealing with
raw video frames. It&apos;s possible to control the behaviour of the queue with
the &quot;drop&quot; and &quot;max-buffers&quot; properties.
If an EOS event was received before any buffers, this function returns
%NULL. Use gst_app_sink_is_eos () to check for the EOS condition.">
<return-value transfer-ownership="full">
<type name="Gst.BufferList" c:type="GstBufferList"/>
</return-value>
</glib:signal>
<glib:signal name="pull-preroll"
doc="Get the last preroll buffer in @appsink. This was the buffer that caused the
appsink to preroll in the PAUSED state. This buffer can be pulled many times
and remains available to the application even after EOS.
This function is typically used when dealing with a pipeline in the PAUSED
state. Calling this function after doing a seek will give the buffer right
after the seek position.
Note that the preroll buffer will also be returned as the first buffer
when calling gst_app_sink_pull_buffer() or the &quot;pull-buffer&quot; action signal.
If an EOS event was received before any buffers, this function returns
%NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll buffer or EOS is received or the appsink
element is set to the READY/NULL state.">
<return-value transfer-ownership="full">
<type name="Gst.Buffer" c:type="GstBuffer"/>
</return-value>
</glib:signal>
</class>
<record name="AppSinkCallbacks"
c:type="GstAppSinkCallbacks"
doc="is called from the steaming thread.
This callback is called from the steaming thread.
The new preroll buffer can be retrieved with
gst_app_sink_pull_preroll() either from this callback
or from any other thread.
This callback is called from the steaming thread.
The new buffer can be retrieved with
gst_app_sink_pull_buffer() either from this callback
or from any other thread.
This callback is called from the steaming thread.
The new bufferlist can be retrieved with
gst_app_sink_pull_buffer_list() either from this callback
or from any other thread.
A set of callbacks that can be installed on the appsink with
gst_app_sink_set_callbacks()."
version="0.10.23">
<field name="eos">
<type name="any" c:type="pointer"/>
</field>
<field name="new_preroll">
<type name="any" c:type="pointer"/>
</field>
<field name="new_buffer">
<type name="any" c:type="pointer"/>
</field>
<field name="new_buffer_list">
<type name="any" c:type="pointer"/>
</field>
<field name="_gst_reserved" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="3">
<type name="any"/>
</array>
</field>
</record>
<record name="AppSinkClass"
c:type="GstAppSinkClass"
glib:is-gtype-struct-for="AppSink">
<field name="basesink_class">
<type name="GstBase.BaseSinkClass" c:type="GstBaseSinkClass"/>
</field>
<field name="eos">
<callback name="eos" c:type="eos">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sink" transfer-ownership="none">
<type name="AppSink" c:type="GstAppSink*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="new_preroll">
<callback name="new_preroll" c:type="new_preroll">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sink" transfer-ownership="none">
<type name="AppSink" c:type="GstAppSink*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="new_buffer">
<callback name="new_buffer" c:type="new_buffer">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sink" transfer-ownership="none">
<type name="AppSink" c:type="GstAppSink*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="pull_preroll">
<callback name="pull_preroll" c:type="pull_preroll">
<return-value transfer-ownership="full">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</return-value>
<parameters>
<parameter name="sink" transfer-ownership="none">
<type name="AppSink" c:type="GstAppSink*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="pull_buffer">
<callback name="pull_buffer" c:type="pull_buffer">
<return-value transfer-ownership="full">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</return-value>
<parameters>
<parameter name="sink" transfer-ownership="none">
<type name="AppSink" c:type="GstAppSink*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="new_buffer_list">
<callback name="new_buffer_list" c:type="new_buffer_list">
<return-value transfer-ownership="full">
<type name="Gst.BufferList" c:type="GstBufferList*"/>
</return-value>
<parameters>
<parameter name="sink" transfer-ownership="none">
<type name="AppSink" c:type="GstAppSink*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="pull_buffer_list">
<callback name="pull_buffer_list" c:type="pull_buffer_list">
<return-value transfer-ownership="full">
<type name="Gst.BufferList" c:type="GstBufferList*"/>
</return-value>
<parameters>
<parameter name="sink" transfer-ownership="none">
<type name="AppSink" c:type="GstAppSink*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gst_reserved">
<array zero-terminated="0" c:type="gpointer" fixed-size="2">
<type name="any"/>
</array>
</field>
</record>
<record name="AppSinkPrivate" c:type="GstAppSinkPrivate">
</record>
<class name="AppSrc"
c:type="GstAppSrc"
parent="GstBase.BaseSrc"
glib:type-name="GstAppSrc"
glib:get-type="gst_app_src_get_type"
glib:type-struct="AppSrcClass">
<implements name="Gst.URIHandler"/>
<method name="set_caps"
c:identifier="gst_app_src_set_caps"
doc="Set the capabilities on the appsrc element. This function takes
a copy of the caps structure. After calling this method, the source will
only produce caps that match @caps. @caps must be fixed and the caps on the
buffers must match the caps or left NULL."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="caps" transfer-ownership="none">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</method>
<method name="get_caps"
c:identifier="gst_app_src_get_caps"
doc="Get the configured caps on @appsrc."
version="0.10.22">
<return-value transfer-ownership="full" doc="after usage.">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
</method>
<method name="set_size"
c:identifier="gst_app_src_set_size"
doc="Set the size of the stream in bytes. A value of -1 means that the size is
not known."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="size" transfer-ownership="none">
<type name="int64" c:type="gint64"/>
</parameter>
</parameters>
</method>
<method name="get_size"
c:identifier="gst_app_src_get_size"
doc="Get the size of the stream in bytes. A value of -1 means that the size is
not known."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="int64" c:type="gint64"/>
</return-value>
</method>
<method name="set_stream_type"
c:identifier="gst_app_src_set_stream_type"
doc="Set the stream type on @appsrc. For seekable streams, the &quot;seek&quot; signal must
be connected to.
A stream_type stream"
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="type" transfer-ownership="none">
<type name="AppStreamType" c:type="GstAppStreamType"/>
</parameter>
</parameters>
</method>
<method name="get_stream_type"
c:identifier="gst_app_src_get_stream_type"
doc="Get the stream type. Control the stream type of @appsrc
with gst_app_src_set_stream_type()."
version="0.10.22">
<return-value transfer-ownership="full">
<type name="AppStreamType" c:type="GstAppStreamType"/>
</return-value>
</method>
<method name="set_max_bytes"
c:identifier="gst_app_src_set_max_bytes"
doc="Set the maximum amount of bytes that can be queued in @appsrc.
After the maximum amount of bytes are queued, @appsrc will emit the
&quot;enough-data&quot; signal."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="max" transfer-ownership="none">
<type name="uint64" c:type="guint64"/>
</parameter>
</parameters>
</method>
<method name="get_max_bytes"
c:identifier="gst_app_src_get_max_bytes"
doc="Get the maximum amount of bytes that can be queued in @appsrc."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="uint64" c:type="guint64"/>
</return-value>
</method>
<method name="set_latency"
c:identifier="gst_app_src_set_latency"
doc="Configure the @min and @max latency in @src. If @min is set to -1, the
default latency calculations for pseudo-live sources will be used."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="min" transfer-ownership="none">
<type name="uint64" c:type="guint64"/>
</parameter>
<parameter name="max" transfer-ownership="none">
<type name="uint64" c:type="guint64"/>
</parameter>
</parameters>
</method>
<method name="get_latency"
c:identifier="gst_app_src_get_latency"
doc="Retrieve the min and max latencies in @min and @max respectively."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="min" direction="out" transfer-ownership="full">
<type name="uint64" c:type="guint64*"/>
</parameter>
<parameter name="max" direction="out" transfer-ownership="full">
<type name="uint64" c:type="guint64*"/>
</parameter>
</parameters>
</method>
<method name="set_emit_signals"
c:identifier="gst_app_src_set_emit_signals"
doc="Make appsrc emit the &quot;new-preroll&quot; and &quot;new-buffer&quot; signals. This option is
by default disabled because signal emission is expensive and unneeded when
the application prefers to operate in pull mode."
version="0.10.23">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="emit" transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="get_emit_signals"
c:identifier="gst_app_src_get_emit_signals"
doc="Check if appsrc will emit the &quot;new-preroll&quot; and &quot;new-buffer&quot; signals.
signals."
version="0.10.23">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
</method>
<method name="push_buffer"
c:identifier="gst_app_src_push_buffer"
doc="Adds a buffer to the queue of buffers that the appsrc element will
push to its source pad. This function takes ownership of the buffer.
When the block property is TRUE, this function can block until free
space becomes available in the queue.
#GST_FLOW_WRONG_STATE when @appsrc is not PAUSED or PLAYING.
#GST_FLOW_UNEXPECTED when EOS occured."
version="0.10.22">
<return-value transfer-ownership="full">
<type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
</parameters>
</method>
<method name="end_of_stream"
c:identifier="gst_app_src_end_of_stream"
doc="Indicates to the appsrc element that the last buffer queued in the
element is the last buffer of the stream.
#GST_FLOW_WRONG_STATE when @appsrc is not PAUSED or PLAYING."
version="0.10.22">
<return-value transfer-ownership="full">
<type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
</return-value>
</method>
<method name="set_callbacks"
c:identifier="gst_app_src_set_callbacks"
doc="Set callbacks which will be executed when data is needed, enough data has
been collected or when a seek should be performed.
This is an alternative to using the signals, it has lower overhead and is thus
less expensive, but also less flexible.
If callbacks are installed, no signals will be emited for performance
reasons."
version="0.10.23">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="callbacks" transfer-ownership="none">
<type name="AppSrcCallbacks" c:type="GstAppSrcCallbacks*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none">
<type name="any" c:type="gpointer"/>
</parameter>
<parameter name="notify" transfer-ownership="none" scope="call">
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<property name="block" writable="1">
<type name="boolean" c:type="gboolean"/>
</property>
<property name="caps" writable="1">
<type name="Gst.Caps" c:type="GstCaps"/>
</property>
<property name="emit-signals" writable="1">
<type name="boolean" c:type="gboolean"/>
</property>
<property name="format" writable="1">
<type name="Gst.Format" c:type="GstFormat"/>
</property>
<property name="is-live" writable="1">
<type name="boolean" c:type="gboolean"/>
</property>
<property name="max-bytes" writable="1">
<type name="uint64" c:type="guint64"/>
</property>
<property name="max-latency" writable="1">
<type name="int64" c:type="gint64"/>
</property>
<property name="min-latency" writable="1">
<type name="int64" c:type="gint64"/>
</property>
<property name="min-percent" writable="1">
<type name="uint" c:type="guint"/>
</property>
<property name="size" writable="1">
<type name="int64" c:type="gint64"/>
</property>
<property name="stream-type" writable="1">
<type name="AppStreamType" c:type="GstAppStreamType"/>
</property>
<field name="basesrc">
<type name="GstBase.BaseSrc" c:type="GstBaseSrc"/>
</field>
<field name="priv">
<type name="AppSrcPrivate" c:type="GstAppSrcPrivate*"/>
</field>
<field name="_gst_reserved">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
<glib:signal name="end-of-stream"
doc="Notify @appsrc that no more buffer are available.">
<return-value transfer-ownership="full">
<type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
</return-value>
</glib:signal>
<glib:signal name="enough-data"
doc="Signal that the source has enough data. It is recommended that the
application stops calling push-buffer until the need-data signal is
emited again to avoid excessive buffer queueing.">
<return-value transfer-ownership="full">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="need-data"
doc="Signal that the source needs more data. In the callback or from another
thread you should call push-buffer or end-of-stream.
pushed into @appsrc.
You can call push-buffer multiple times until the enough-data signal is
fired.">
<return-value transfer-ownership="full">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="length" transfer-ownership="none">
<type name="uint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="push-buffer"
doc="Adds a buffer to the queue of buffers that the appsrc element will
push to its source pad. This function does not take ownership of the
buffer so the buffer needs to be unreffed after calling this function.
When the block property is TRUE, this function can block until free space
becomes available in the queue.">
<return-value transfer-ownership="full">
<type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="seek-data"
doc="Seek to the given offset. The next push-buffer should produce buffers from
the new @offset.
This callback is only called for seekable stream types.">
<return-value transfer-ownership="full">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="offset" transfer-ownership="none">
<type name="uint64" c:type="guint64"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="AppSrcCallbacks"
c:type="GstAppSrcCallbacks"
doc="pushed to appsrc from this thread or another thread. @length is just a hint
and when it is set to -1, any number of bytes can be pushed into @appsrc.
application stops calling push-buffer until the need_data callback is
emited again to avoid excessive buffer queueing.
The next push-buffer should produce buffers from the new @offset.
This callback is only called for seekable stream types.
A set of callbacks that can be installed on the appsrc with
gst_app_src_set_callbacks()."
version="0.10.23">
<field name="need_data">
<type name="any" c:type="pointer"/>
</field>
<field name="enough_data">
<type name="any" c:type="pointer"/>
</field>
<field name="seek_data">
<type name="any" c:type="pointer"/>
</field>
<field name="_gst_reserved" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
</record>
<record name="AppSrcClass"
c:type="GstAppSrcClass"
glib:is-gtype-struct-for="AppSrc">
<field name="basesrc_class">
<type name="GstBase.BaseSrcClass" c:type="GstBaseSrcClass"/>
</field>
<field name="need_data">
<callback name="need_data" c:type="need_data">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="src" transfer-ownership="none">
<type name="AppSrc" c:type="GstAppSrc*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<type name="uint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="enough_data">
<callback name="enough_data" c:type="enough_data">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="src" transfer-ownership="none">
<type name="AppSrc" c:type="GstAppSrc*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="seek_data">
<callback name="seek_data" c:type="seek_data">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="src" transfer-ownership="none">
<type name="AppSrc" c:type="GstAppSrc*"/>
</parameter>
<parameter name="offset" transfer-ownership="none">
<type name="uint64" c:type="guint64"/>
</parameter>
</parameters>
</callback>
</field>
<field name="push_buffer">
<callback name="push_buffer" c:type="push_buffer">
<return-value transfer-ownership="full">
<type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
</return-value>
<parameters>
<parameter name="src" transfer-ownership="none">
<type name="AppSrc" c:type="GstAppSrc*"/>
</parameter>
<parameter name="buffer" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="end_of_stream">
<callback name="end_of_stream" c:type="end_of_stream">
<return-value transfer-ownership="full">
<type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
</return-value>
<parameters>
<parameter name="src" transfer-ownership="none">
<type name="AppSrc" c:type="GstAppSrc*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gst_reserved">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
</record>
<record name="AppSrcPrivate" c:type="GstAppSrcPrivate">
</record>
<enumeration name="AppStreamType"
doc="live stream.
be very fast, such as data from a webserver.
such as in a local file.
The stream type."
c:type="GstAppStreamType">
<member name="stream"
value="0"
c:identifier="GST_APP_STREAM_TYPE_STREAM"/>
<member name="seekable"
value="1"
c:identifier="GST_APP_STREAM_TYPE_SEEKABLE"/>
<member name="random_access"
value="2"
c:identifier="GST_APP_STREAM_TYPE_RANDOM_ACCESS"/>
</enumeration>
</namespace>
</repository>

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.app.ffi ;
IN: gstreamer.app

View File

@ -0,0 +1,17 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries combinators kernel
system
gobject-introspection glib.ffi gstreamer.ffi ;
IN: gstreamer.app.ffi
<<
"gstreamer.app" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstapp-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/app/GstApp-0.10.gir

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.audio.ffi ;
IN: gstreamer.audio

View File

@ -0,0 +1,18 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries combinators kernel
system
gobject-introspection glib.ffi gstreamer.ffi gstreamer.base.ffi
gstreamer.interfaces.ffi ;
IN: gstreamer.audio.ffi
<<
"gstreamer.audio" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstaudio-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/audio/GstAudio-0.10.gir

View File

@ -0,0 +1 @@
Anton Gorenko

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.base.ffi ;
IN: gstreamer.base

View File

@ -0,0 +1,16 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.libraries combinators kernel system
gobject-introspection glib.ffi gstreamer.ffi ;
IN: gstreamer.base.ffi
<<
"gstreamer.base" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstbase-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/base/GstBase-0.10.gir

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.controller.ffi ;
IN: gstreamer.controller

View File

@ -0,0 +1,17 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries combinators kernel
system
gobject-introspection glib.ffi gobject.ffi gstreamer.ffi ;
IN: gstreamer.controller.ffi
<<
"gstreamer.controller" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstcontroller-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/controller/GstController-0.10.gir

View File

@ -0,0 +1,462 @@
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.0"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GLib" version="2.0"/>
<include name="GModule" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gst" version="0.10"/>
<include name="libxml2" version="2.0"/>
<package name="gstreamer-0.10"/>
<c:include name="gst/fft/gstfft.h"/>
<c:include name="gst/fft/gstfftf32.h"/>
<c:include name="gst/fft/gstfftf64.h"/>
<c:include name="gst/fft/gstffts16.h"/>
<c:include name="gst/fft/gstffts32.h"/>
<namespace name="GstFft"
version="0.10"
shared-library="libgstfft-0.10.so.0"
c:prefix="Gst">
<record name="FFTF32"
c:type="GstFFTF32"
doc="Instance structure for #GstFFTF32.">
<field name="cfg" writable="1">
<type name="any" c:type="void*"/>
</field>
<field name="inverse" writable="1">
<type name="boolean" c:type="gboolean"/>
</field>
<field name="len" writable="1">
<type name="int" c:type="gint"/>
</field>
<field name="_padding" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
<constructor name="new"
c:identifier="gst_fft_f32_new"
doc="This returns a new #GstFFTF32 instance with the given parameters. It makes
sense to keep one instance for several calls for speed reasons.
2, 3 and 5. To get the next number with this characteristics use
gst_fft_next_fast_length().">
<return-value transfer-ownership="full">
<type name="FFTF32" c:type="GstFFTF32*"/>
</return-value>
<parameters>
<parameter name="len" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
<parameter name="inverse" transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</parameter>
</parameters>
</constructor>
<method name="fft"
c:identifier="gst_fft_f32_fft"
doc="This performs the FFT on @timedata and puts the result in @freqdata.
allocating the #GstFFTF32 instance with gst_fft_f32_new().
domain samples.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="none">
<type name="float" c:type="gfloat*"/>
</parameter>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTF32Complex" c:type="GstFFTF32Complex*"/>
</parameter>
</parameters>
</method>
<method name="inverse_fft"
c:identifier="gst_fft_f32_inverse_fft"
doc="This performs the inverse FFT on @freqdata and puts the result in @timedata.
while allocating the #GstFFTF32 instance with gst_fft_f32_new().">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTF32Complex" c:type="GstFFTF32Complex*"/>
</parameter>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="float" c:type="gfloat*"/>
</parameter>
</parameters>
</method>
<method name="free"
c:identifier="gst_fft_f32_free"
doc="This frees the memory allocated for @self.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
<method name="window"
c:identifier="gst_fft_f32_window"
doc="This calls the window function @window on the @timedata sample buffer.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="float" c:type="gfloat*"/>
</parameter>
<parameter name="window" transfer-ownership="none">
<type name="FFTWindow" c:type="GstFFTWindow"/>
</parameter>
</parameters>
</method>
</record>
<record name="FFTF32Complex"
c:type="GstFFTF32Complex"
doc="Data type for complex numbers composed of
32 bit float.">
<field name="r" writable="1">
<type name="float" c:type="gfloat"/>
</field>
<field name="i" writable="1">
<type name="float" c:type="gfloat"/>
</field>
</record>
<record name="FFTF64"
c:type="GstFFTF64"
doc="Instance structure for #GstFFTF64.">
<field name="cfg" writable="1">
<type name="any" c:type="void*"/>
</field>
<field name="inverse" writable="1">
<type name="boolean" c:type="gboolean"/>
</field>
<field name="len" writable="1">
<type name="int" c:type="gint"/>
</field>
<field name="_padding" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
<constructor name="new"
c:identifier="gst_fft_f64_new"
doc="This returns a new #GstFFTF64 instance with the given parameters. It makes
sense to keep one instance for several calls for speed reasons.
2, 3 and 5. To get the next number with this characteristics use
gst_fft_next_fast_length().">
<return-value transfer-ownership="full">
<type name="FFTF64" c:type="GstFFTF64*"/>
</return-value>
<parameters>
<parameter name="len" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
<parameter name="inverse" transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</parameter>
</parameters>
</constructor>
<method name="fft"
c:identifier="gst_fft_f64_fft"
doc="This performs the FFT on @timedata and puts the result in @freqdata.
allocating the #GstFFTF64 instance with gst_fft_f64_new().
domain samples.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="none">
<type name="double" c:type="gdouble*"/>
</parameter>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTF64Complex" c:type="GstFFTF64Complex*"/>
</parameter>
</parameters>
</method>
<method name="inverse_fft"
c:identifier="gst_fft_f64_inverse_fft"
doc="This performs the inverse FFT on @freqdata and puts the result in @timedata.
while allocating the #GstFFTF64 instance with gst_fft_f64_new().">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTF64Complex" c:type="GstFFTF64Complex*"/>
</parameter>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="double" c:type="gdouble*"/>
</parameter>
</parameters>
</method>
<method name="free"
c:identifier="gst_fft_f64_free"
doc="This frees the memory allocated for @self.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
<method name="window"
c:identifier="gst_fft_f64_window"
doc="This calls the window function @window on the @timedata sample buffer.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="double" c:type="gdouble*"/>
</parameter>
<parameter name="window" transfer-ownership="none">
<type name="FFTWindow" c:type="GstFFTWindow"/>
</parameter>
</parameters>
</method>
</record>
<record name="FFTF64Complex"
c:type="GstFFTF64Complex"
doc="Data type for complex numbers composed of
64 bit float.">
<field name="r" writable="1">
<type name="double" c:type="gdouble"/>
</field>
<field name="i" writable="1">
<type name="double" c:type="gdouble"/>
</field>
</record>
<record name="FFTS16"
c:type="GstFFTS16"
doc="Instance structure for #GstFFTS16.">
<field name="cfg" writable="1">
<type name="any" c:type="void*"/>
</field>
<field name="inverse" writable="1">
<type name="boolean" c:type="gboolean"/>
</field>
<field name="len" writable="1">
<type name="int" c:type="gint"/>
</field>
<field name="_padding" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
<constructor name="new"
c:identifier="gst_fft_s16_new"
doc="This returns a new #GstFFTS16 instance with the given parameters. It makes
sense to keep one instance for several calls for speed reasons.
2, 3 and 5. To get the next number with this characteristics use
gst_fft_next_fast_length().">
<return-value transfer-ownership="full">
<type name="FFTS16" c:type="GstFFTS16*"/>
</return-value>
<parameters>
<parameter name="len" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
<parameter name="inverse" transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</parameter>
</parameters>
</constructor>
<method name="fft"
c:identifier="gst_fft_s16_fft"
doc="This performs the FFT on @timedata and puts the result in @freqdata.
allocating the #GstFFTS16 instance with gst_fft_s16_new().
domain samples.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="none">
<type name="int16" c:type="gint16*"/>
</parameter>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTS16Complex" c:type="GstFFTS16Complex*"/>
</parameter>
</parameters>
</method>
<method name="inverse_fft"
c:identifier="gst_fft_s16_inverse_fft"
doc="This performs the inverse FFT on @freqdata and puts the result in @timedata.
while allocating the #GstFFTS16 instance with gst_fft_s16_new().">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTS16Complex" c:type="GstFFTS16Complex*"/>
</parameter>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="int16" c:type="gint16*"/>
</parameter>
</parameters>
</method>
<method name="free"
c:identifier="gst_fft_s16_free"
doc="This frees the memory allocated for @self.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
<method name="window"
c:identifier="gst_fft_s16_window"
doc="This calls the window function @window on the @timedata sample buffer.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="int16" c:type="gint16*"/>
</parameter>
<parameter name="window" transfer-ownership="none">
<type name="FFTWindow" c:type="GstFFTWindow"/>
</parameter>
</parameters>
</method>
</record>
<record name="FFTS16Complex"
c:type="GstFFTS16Complex"
doc="Data type for complex numbers composed of
signed 16 bit integers.">
<field name="r" writable="1">
<type name="int16" c:type="gint16"/>
</field>
<field name="i" writable="1">
<type name="int16" c:type="gint16"/>
</field>
</record>
<record name="FFTS32"
c:type="GstFFTS32"
doc="Instance structure for #GstFFTS32.">
<field name="cfg" writable="1">
<type name="any" c:type="void*"/>
</field>
<field name="inverse" writable="1">
<type name="boolean" c:type="gboolean"/>
</field>
<field name="len" writable="1">
<type name="int" c:type="gint"/>
</field>
<field name="_padding" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
<constructor name="new"
c:identifier="gst_fft_s32_new"
doc="This returns a new #GstFFTS32 instance with the given parameters. It makes
sense to keep one instance for several calls for speed reasons.
2, 3 and 5. To get the next number with this characteristics use
gst_fft_next_fast_length().">
<return-value transfer-ownership="full">
<type name="FFTS32" c:type="GstFFTS32*"/>
</return-value>
<parameters>
<parameter name="len" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
<parameter name="inverse" transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</parameter>
</parameters>
</constructor>
<method name="fft"
c:identifier="gst_fft_s32_fft"
doc="This performs the FFT on @timedata and puts the result in @freqdata.
allocating the #GstFFTS32 instance with gst_fft_s32_new().
domain samples.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="none">
<type name="int32" c:type="gint32*"/>
</parameter>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTS32Complex" c:type="GstFFTS32Complex*"/>
</parameter>
</parameters>
</method>
<method name="inverse_fft"
c:identifier="gst_fft_s32_inverse_fft"
doc="This performs the inverse FFT on @freqdata and puts the result in @timedata.
while allocating the #GstFFTS32 instance with gst_fft_s32_new().">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="freqdata" transfer-ownership="none">
<type name="FFTS32Complex" c:type="GstFFTS32Complex*"/>
</parameter>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="int32" c:type="gint32*"/>
</parameter>
</parameters>
</method>
<method name="free"
c:identifier="gst_fft_s32_free"
doc="This frees the memory allocated for @self.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
<method name="window"
c:identifier="gst_fft_s32_window"
doc="This calls the window function @window on the @timedata sample buffer.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="timedata" direction="out" transfer-ownership="full">
<type name="int32" c:type="gint32*"/>
</parameter>
<parameter name="window" transfer-ownership="none">
<type name="FFTWindow" c:type="GstFFTWindow"/>
</parameter>
</parameters>
</method>
</record>
<record name="FFTS32Complex"
c:type="GstFFTS32Complex"
doc="Data type for complex numbers composed of
signed 32 bit integers.">
<field name="r" writable="1">
<type name="int32" c:type="gint32"/>
</field>
<field name="i" writable="1">
<type name="int32" c:type="gint32"/>
</field>
</record>
<enumeration name="FFTWindow"
doc="The various window functions available."
c:type="GstFFTWindow">
<member name="rectangular"
value="0"
c:identifier="GST_FFT_WINDOW_RECTANGULAR"/>
<member name="hamming" value="1" c:identifier="GST_FFT_WINDOW_HAMMING"/>
<member name="hann" value="2" c:identifier="GST_FFT_WINDOW_HANN"/>
<member name="bartlett"
value="3"
c:identifier="GST_FFT_WINDOW_BARTLETT"/>
<member name="blackman"
value="4"
c:identifier="GST_FFT_WINDOW_BLACKMAN"/>
</enumeration>
<function name="next_fast_length"
c:identifier="gst_fft_next_fast_length"
doc="Returns the next number to @n that is entirely a product
of 2, 3 and 5. Using this as the @len parameter for
the different GstFFT types will provide the best performance.">
<return-value transfer-ownership="none">
<type name="int" c:type="gint"/>
</return-value>
<parameters>
<parameter name="n" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>

View File

@ -0,0 +1,17 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries combinators kernel
system
gobject-introspection glib.ffi gstreamer.ffi ;
IN: gstreamer.fft.ffi
<<
"gstreamer.fft" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstfft-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/fft/GstFft-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.fft.ffi ;
IN: gstreamer.fft

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries combinators kernel
system
gobject-introspection glib.ffi gobject.ffi gstreamer.ffi ;
IN: gstreamer.interfaces.ffi
<<
"gstreamer.interfaces" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstinterfaces-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/interfaces/GstInterfaces-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.interfaces.ffi ;
IN: gstreamer.interfaces

View File

@ -0,0 +1,279 @@
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.0"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GLib" version="2.0"/>
<include name="GModule" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gst" version="0.10"/>
<include name="libxml2" version="2.0"/>
<package name="gstreamer-0.10"/>
<namespace name="GstNet"
version="0.10"
shared-library="libgstnet-0.10.so.0"
c:prefix="Gst">
<class name="NetClientClock"
c:type="GstNetClientClock"
doc="Opaque #GstNetClientClock structure."
parent="Gst.SystemClock"
glib:type-name="GstNetClientClock"
glib:get-type="gst_net_client_clock_get_type"
glib:type-struct="NetClientClockClass">
<constructor name="new"
c:identifier="gst_net_client_clock_new"
doc="Create a new #GstNetClientClock that will report the time
provided by the #GstNetTimeProvider on @remote_address and
clock.">
<return-value transfer-ownership="full">
<type name="NetClientClock" c:type="GstClock*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="remote_address" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="remote_port" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
<parameter name="base_time" transfer-ownership="none">
<type name="Gst.ClockTime" c:type="GstClockTime"/>
</parameter>
</parameters>
</constructor>
<property name="address" writable="1">
<type name="utf8" c:type="gchararray"/>
</property>
<property name="port" writable="1">
<type name="int" c:type="gint"/>
</property>
<field name="clock">
<type name="Gst.SystemClock" c:type="GstSystemClock"/>
</field>
<field name="address">
<type name="utf8" c:type="gchar*"/>
</field>
<field name="port">
<type name="int" c:type="gint"/>
</field>
<field name="sock">
<type name="int" c:type="int"/>
</field>
<field name="control_sock">
<array zero-terminated="0" c:type="int" fixed-size="2">
<type name="int"/>
</array>
</field>
<field name="current_timeout">
<type name="Gst.ClockTime" c:type="GstClockTime"/>
</field>
<field name="servaddr">
<type name="any" c:type="any*"/>
</field>
<field name="thread">
<type name="GLib.Thread" c:type="GThread*"/>
</field>
<field name="priv">
<type name="NetClientClockPrivate" c:type="GstNetClientClockPrivate*"/>
</field>
<field name="_gst_reserved">
<array zero-terminated="0" c:type="gpointer" fixed-size="3">
<type name="any"/>
</array>
</field>
</class>
<record name="NetClientClockClass"
c:type="GstNetClientClockClass"
glib:is-gtype-struct-for="NetClientClock">
<field name="parent_class">
<type name="Gst.SystemClockClass" c:type="GstSystemClockClass"/>
</field>
<field name="_gst_reserved">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
</record>
<record name="NetClientClockPrivate" c:type="GstNetClientClockPrivate">
</record>
<record name="NetTimePacket"
c:type="GstNetTimePacket"
doc="Content of a #GstNetTimePacket.">
<field name="local_time" writable="1">
<type name="Gst.ClockTime" c:type="GstClockTime"/>
</field>
<field name="remote_time" writable="1">
<type name="Gst.ClockTime" c:type="GstClockTime"/>
</field>
<constructor name="new"
c:identifier="gst_net_time_packet_new"
doc="Creates a new #GstNetTimePacket from a buffer received over the network. The
caller is responsible for ensuring that @buffer is at least
#GST_NET_TIME_PACKET_SIZE bytes long.
If @buffer is #NULL, the local and remote times will be set to
#GST_CLOCK_TIME_NONE.
MT safe. Caller owns return value (g_free to free).">
<return-value transfer-ownership="full">
<type name="NetTimePacket" c:type="GstNetTimePacket*"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<array c:type="guint8*">
<type name="uint8"/>
</array>
</parameter>
</parameters>
</constructor>
<method name="serialize"
c:identifier="gst_net_time_packet_serialize"
doc="Serialized a #GstNetTimePacket into a newly-allocated sequence of
#GST_NET_TIME_PACKET_SIZE bytes, in network byte order. The value returned is
suitable for passing to write(2) or sendto(2) for communication over the
network.
MT safe. Caller owns return value (g_free to free).">
<return-value transfer-ownership="full">
<array c:type="guint8*">
<type name="uint8"/>
</array>
</return-value>
</method>
<method name="send"
c:identifier="gst_net_time_packet_send"
doc="Sends a #GstNetTimePacket over a socket. Essentially a thin wrapper around
sendto(2) and gst_net_time_packet_serialize().
MT safe.">
<return-value transfer-ownership="none">
<type name="int" c:type="gint"/>
</return-value>
<parameters>
<parameter name="fd" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
<parameter name="addr" transfer-ownership="none">
<type name="any" c:type="any*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<type name="int32" c:type="socklen_t"/>
</parameter>
</parameters>
</method>
</record>
<class name="NetTimeProvider"
c:type="GstNetTimeProvider"
doc="Opaque #GstNetTimeProvider structure."
parent="Gst.Object"
glib:type-name="GstNetTimeProvider"
glib:get-type="gst_net_time_provider_get_type"
glib:type-struct="NetTimeProviderClass">
<constructor name="new"
c:identifier="gst_net_time_provider_new"
doc="to bind to all addresses
Allows network clients to get the current time of @clock.">
<return-value transfer-ownership="full">
<type name="NetTimeProvider" c:type="GstNetTimeProvider*"/>
</return-value>
<parameters>
<parameter name="clock" transfer-ownership="none">
<type name="Gst.Clock" c:type="GstClock*"/>
</parameter>
<parameter name="address" transfer-ownership="none" doc="or NULL">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="port" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
</parameters>
</constructor>
<property name="active" writable="1">
<type name="boolean" c:type="gboolean"/>
</property>
<property name="address" writable="1">
<type name="utf8" c:type="gchararray"/>
</property>
<property name="clock" writable="1">
<type name="Gst.Clock" c:type="GstClock"/>
</property>
<property name="port" writable="1">
<type name="int" c:type="gint"/>
</property>
<field name="parent">
<type name="Gst.Object" c:type="GstObject"/>
</field>
<field name="address">
<type name="utf8" c:type="gchar*"/>
</field>
<field name="port">
<type name="int" c:type="int"/>
</field>
<field name="sock">
<type name="int" c:type="int"/>
</field>
<field name="control_sock">
<array zero-terminated="0" c:type="int" fixed-size="2">
<type name="int"/>
</array>
</field>
<field name="thread">
<type name="GLib.Thread" c:type="GThread*"/>
</field>
<field name="clock">
<type name="Gst.Clock" c:type="GstClock*"/>
</field>
<union name="active" c:type="active">
<field name="_gst_reserved1" writable="1">
<type name="any" c:type="gpointer"/>
</field>
<field name="active" writable="1">
<type name="int" c:type="gint"/>
</field>
</union>
<field name="priv">
<type name="NetTimeProviderPrivate"
c:type="GstNetTimeProviderPrivate*"/>
</field>
<field name="_gst_reserved">
<array zero-terminated="0" c:type="gpointer" fixed-size="2">
<type name="any"/>
</array>
</field>
</class>
<record name="NetTimeProviderClass"
c:type="GstNetTimeProviderClass"
glib:is-gtype-struct-for="NetTimeProvider">
<field name="parent_class">
<type name="Gst.ObjectClass" c:type="GstObjectClass"/>
</field>
</record>
<record name="NetTimeProviderPrivate" c:type="GstNetTimeProviderPrivate">
</record>
<constant name="TIME_PACKET_SIZE" value="16">
<type name="int"/>
</constant>
<function name="time_packet_receive"
c:identifier="gst_net_time_packet_receive"
doc="Receives a #GstNetTimePacket over a socket. Handles interrupted system calls,
but otherwise returns NULL on error. See recvfrom(2) for more information on
how to interpret @sockaddr.
MT safe. Caller owns return value (g_free to free).">
<return-value transfer-ownership="full">
<type name="NetTimePacket" c:type="GstNetTimePacket*"/>
</return-value>
<parameters>
<parameter name="fd" transfer-ownership="none">
<type name="int" c:type="gint"/>
</parameter>
<parameter name="addr" transfer-ownership="none">
<type name="any" c:type="any*"/>
</parameter>
<parameter name="len" direction="out" transfer-ownership="full">
<type name="int32" c:type="socklen_t*"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>

View File

@ -0,0 +1,19 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.libraries combinators kernel system
gobject-introspection glib.ffi gstreamer.ffi ;
FROM: unix.types => socklen_t ;
IN: gstreamer.net.ffi
<<
"gstreamer.net" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstnet-0.10.so" cdecl add-library ] }
} cond
>>
REPLACE-C-TYPE: any gpointer
GIR: vocab:gstreamer/net/GstNet-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.net.ffi ;
IN: gstreamer.net

View File

@ -0,0 +1,267 @@
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.0"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GLib" version="2.0"/>
<include name="GModule" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gst" version="0.10"/>
<include name="libxml2" version="2.0"/>
<package name="gstreamer-0.10"/>
<c:include name="gst/netbuffer/gstnetbuffer.h"/>
<namespace name="GstNetbuffer"
version="0.10"
shared-library="libgstnetbuffer-0.10.so.0"
c:prefix="Gst">
<record name="NetAddress"
c:type="GstNetAddress"
doc="An opaque network address as used in #GstNetBuffer.">
<field name="type" writable="1">
<type name="NetType" c:type="GstNetType"/>
</field>
<union name="address" c:type="address">
<field name="ip6" writable="1">
<array zero-terminated="0" c:type="guint8" fixed-size="16">
<type name="uint8"/>
</array>
</field>
<field name="ip4" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
</union>
<field name="port" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="_gst_reserved" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
</record>
<record name="NetBuffer"
c:type="GstNetBuffer"
doc="buffer for use in network sources and sinks.
It contains the source or destination address of the buffer.">
<field name="buffer" writable="1">
<type name="Gst.Buffer" c:type="GstBuffer"/>
</field>
<field name="from" writable="1">
<type name="NetAddress" c:type="GstNetAddress"/>
</field>
<field name="to" writable="1">
<type name="NetAddress" c:type="GstNetAddress"/>
</field>
<field name="_gst_reserved" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
</record>
<record name="NetBufferClass" c:type="GstNetBufferClass">
<field name="buffer_class" writable="1">
<type name="Gst.BufferClass" c:type="GstBufferClass"/>
</field>
<field name="_gst_reserved" writable="1">
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
<type name="any"/>
</array>
</field>
</record>
<enumeration name="NetType"
doc="The Address type used in #GstNetAddress."
c:type="GstNetType">
<member name="unknown" value="0" c:identifier="GST_NET_TYPE_UNKNOWN"/>
<member name="ip4" value="1" c:identifier="GST_NET_TYPE_IP4"/>
<member name="ip6" value="2" c:identifier="GST_NET_TYPE_IP6"/>
</enumeration>
<function name="netaddress_equal"
c:identifier="gst_netaddress_equal"
doc="Compare two #GstNetAddress structures"
version="0.10.18">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="naddr1" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="naddr2" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
</parameters>
</function>
<function name="netaddress_get_address_bytes"
c:identifier="gst_netaddress_get_address_bytes"
doc="Get just the address bytes stored in @naddr into @address.
Note that @port is expressed in network byte order, use g_ntohs() to convert
it to host order. IP4 addresses are also stored in network byte order."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="int" c:type="gint"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="address" transfer-ownership="none">
<type name="uint8" c:type="guint8"/>
</parameter>
<parameter name="port" direction="out" transfer-ownership="full">
<type name="uint16" c:type="guint16*"/>
</parameter>
</parameters>
</function>
<function name="netaddress_get_ip4_address"
c:identifier="gst_netaddress_get_ip4_address"
doc="Get the IPv4 address stored in @naddr into @address. This function requires
that the address type of @naddr is of type #GST_NET_TYPE_IP4.
Note that @port and @address are expressed in network byte order, use
g_ntohs() and g_ntohl() to convert them to host order.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="address" direction="out" transfer-ownership="full">
<type name="uint32" c:type="guint32*"/>
</parameter>
<parameter name="port" direction="out" transfer-ownership="full">
<type name="uint16" c:type="guint16*"/>
</parameter>
</parameters>
</function>
<function name="netaddress_get_ip6_address"
c:identifier="gst_netaddress_get_ip6_address"
doc="Get the IPv6 address stored in @naddr into @address.
If @naddr is of type GST_NET_TYPE_IP4, the transitional IP6 address is
returned.
Note that @port is expressed in network byte order, use g_ntohs() to convert
it to host order.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="address" transfer-ownership="none">
<type name="uint8" c:type="guint8"/>
</parameter>
<parameter name="port" direction="out" transfer-ownership="full">
<type name="uint16" c:type="guint16*"/>
</parameter>
</parameters>
</function>
<function name="netaddress_get_net_type"
c:identifier="gst_netaddress_get_net_type"
doc="Get the type of address stored in @naddr.">
<return-value transfer-ownership="full">
<type name="NetType" c:type="GstNetType"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
</parameters>
</function>
<function name="netaddress_set_address_bytes"
c:identifier="gst_netaddress_set_address_bytes"
doc="Set just the address bytes stored in @naddr into @address.
Note that @port must be expressed in network byte order, use g_htons() to
convert it to network byte order order. IP4 address bytes must also be
stored in network byte order."
version="0.10.22">
<return-value transfer-ownership="none">
<type name="int" c:type="gint"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="type" transfer-ownership="none">
<type name="NetType" c:type="GstNetType"/>
</parameter>
<parameter name="address" transfer-ownership="none">
<type name="uint8" c:type="guint8"/>
</parameter>
<parameter name="port" transfer-ownership="none">
<type name="uint16" c:type="guint16"/>
</parameter>
</parameters>
</function>
<function name="netaddress_set_ip4_address"
c:identifier="gst_netaddress_set_ip4_address"
doc="Set @naddr with the IPv4 @address and @port pair.
Note that @port and @address must be expressed in network byte order,
use g_htons() and g_htonl() to convert them to network byte order.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="address" transfer-ownership="none">
<type name="uint32" c:type="guint32"/>
</parameter>
<parameter name="port" transfer-ownership="none">
<type name="uint16" c:type="guint16"/>
</parameter>
</parameters>
</function>
<function name="netaddress_set_ip6_address"
c:identifier="gst_netaddress_set_ip6_address"
doc="Set @naddr with the IPv6 @address and @port pair.
Note that @port must be expressed in network byte order, use g_htons() to convert
it to network byte order.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="address" transfer-ownership="none">
<type name="uint8" c:type="guint8"/>
</parameter>
<parameter name="port" transfer-ownership="none">
<type name="uint16" c:type="guint16"/>
</parameter>
</parameters>
</function>
<function name="netaddress_to_string"
c:identifier="gst_netaddress_to_string"
doc="Copies a string representation of @naddr into @dest. Up to @len bytes are
copied.
enough"
version="0.10.24">
<return-value transfer-ownership="none">
<type name="int" c:type="gint"/>
</return-value>
<parameters>
<parameter name="naddr" transfer-ownership="none">
<type name="NetAddress" c:type="GstNetAddress*"/>
</parameter>
<parameter name="dest" transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<type name="ulong" c:type="gulong"/>
</parameter>
</parameters>
</function>
<function name="new"
c:identifier="gst_netbuffer_new"
doc="Create a new network buffer.">
<return-value transfer-ownership="full">
<type name="NetBuffer" c:type="GstNetBuffer*"/>
</return-value>
</function>
</namespace>
</repository>

View File

@ -0,0 +1,16 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.libraries combinators kernel system
gobject-introspection glib.ffi ;
IN: gstreamer.netbuffer.ffi
<<
"gstreamer.netbuffer" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstnetbuffer-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/netbuffer/GstNetbuffer-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.netbuffer.ffi ;
IN: gstreamer.netbuffer

View File

@ -0,0 +1,665 @@
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.0"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GLib" version="2.0"/>
<include name="GModule" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gst" version="0.10"/>
<include name="libxml2" version="2.0"/>
<package name="gstreamer-0.10"/>
<c:include name="gst/pbutils/descriptions.h"/>
<c:include name="gst/pbutils/install-plugins.h"/>
<c:include name="gst/pbutils/missing-plugins.h"/>
<c:include name="gst/pbutils/pbutils-enumtypes.h"/>
<c:include name="gst/pbutils/pbutils.h"/>
<namespace name="GstPbutils"
version="0.10"
shared-library="libgstpbutils-0.10.so.0"
c:prefix="Gst">
<record name="InstallPluginsContext"
c:type="GstInstallPluginsContext"
doc="Opaque context structure for the plugin installation. Use the provided
API to set details on it."
version="0.10.12"
glib:type-name="GstInstallPluginsContext"
glib:get-type="gst_install_plugins_context_get_type">
<constructor name="new"
c:identifier="gst_install_plugins_context_new"
doc="Creates a new #GstInstallPluginsContext.
gst_install_plugins_context_free() when no longer needed"
version="0.10.12">
<return-value transfer-ownership="full">
<type name="InstallPluginsContext"
c:type="GstInstallPluginsContext*"/>
</return-value>
</constructor>
<method name="free"
c:identifier="gst_install_plugins_context_free"
doc="Frees a #GstInstallPluginsContext."
version="0.10.12">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
<method name="set_xid"
c:identifier="gst_install_plugins_context_set_xid"
doc="This function is for X11-based applications (such as most Gtk/Qt
applications on linux/unix) only. You can use it to tell the external
installer the XID of your main application window. That way the installer
can make its own window transient to your application window during the
installation.
If set, the XID will be passed to the installer via a --transient-for=XID
command line option.
Gtk+/Gnome application should be able to obtain the XID of the top-level
window like this:
&lt;programlisting&gt;
##include &amp;lt;gtk/gtk.h&amp;gt;
##ifdef GDK_WINDOWING_X11
##include &amp;lt;gdk/gdkx.h&amp;gt;
##endif
...
##ifdef GDK_WINDOWING_X11
xid = GDK_WINDOW_XWINDOW (GTK_WIDGET (application_window)-&amp;gt;window);
##endif
...
&lt;/programlisting&gt;"
version="0.10.12">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="xid"
transfer-ownership="none"
doc="of the top-level application">
<type name="uint" c:type="guint"/>
</parameter>
</parameters>
</method>
</record>
<callback name="InstallPluginsResultFunc"
c:type="GstInstallPluginsResultFunc"
doc="The prototype of the callback function that will be called once the
external plugin installer program has returned. You only need to provide
a callback function if you are using the asynchronous interface."
version="0.10.12">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="result" transfer-ownership="none">
<type name="InstallPluginsReturn" c:type="GstInstallPluginsReturn"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" closure="1">
<type name="any" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<enumeration name="InstallPluginsReturn"
doc="installed
any of the requested plugins could be found. Only return this if nothing
has been installed. Return #GST_INSTALL_PLUGINS_PARTIAL_SUCCESS if
some (but not all) of the requested plugins could be installed.
this happens, the user has already seen an error message and another
one should not be displayed
(ie. death by signal)
be installed, but not all
indicate that everything went fine so far and the provided callback
will be called with the result of the installation later
occured when trying to start the installer
actual installer is not installed
installation is still in progress, try again later
Result codes returned by gst_install_plugins_async() and
gst_install_plugins_sync(), and also the result code passed to the
#GstInstallPluginsResultFunc specified with gst_install_plugin_async().
These codes indicate success or failure of starting an external installer
program and to what extent the requested plugins could be installed."
version="0.10.12"
glib:type-name="GstInstallPluginsReturn"
glib:get-type="gst_install_plugins_return_get_type"
c:type="GstInstallPluginsReturn">
<member name="success"
value="0"
c:identifier="GST_INSTALL_PLUGINS_SUCCESS"
glib:nick="success"/>
<member name="not_found"
value="1"
c:identifier="GST_INSTALL_PLUGINS_NOT_FOUND"
glib:nick="not-found"/>
<member name="error"
value="2"
c:identifier="GST_INSTALL_PLUGINS_ERROR"
glib:nick="error"/>
<member name="partial_success"
value="3"
c:identifier="GST_INSTALL_PLUGINS_PARTIAL_SUCCESS"
glib:nick="partial-success"/>
<member name="user_abort"
value="4"
c:identifier="GST_INSTALL_PLUGINS_USER_ABORT"
glib:nick="user-abort"/>
<member name="crashed"
value="100"
c:identifier="GST_INSTALL_PLUGINS_CRASHED"
glib:nick="crashed"/>
<member name="invalid"
value="101"
c:identifier="GST_INSTALL_PLUGINS_INVALID"
glib:nick="invalid"/>
<member name="started_ok"
value="200"
c:identifier="GST_INSTALL_PLUGINS_STARTED_OK"
glib:nick="started-ok"/>
<member name="internal_failure"
value="201"
c:identifier="GST_INSTALL_PLUGINS_INTERNAL_FAILURE"
glib:nick="internal-failure"/>
<member name="helper_missing"
value="202"
c:identifier="GST_INSTALL_PLUGINS_HELPER_MISSING"
glib:nick="helper-missing"/>
<member name="install_in_progress"
value="203"
c:identifier="GST_INSTALL_PLUGINS_INSTALL_IN_PROGRESS"
glib:nick="install-in-progress"/>
</enumeration>
<function name="install_plugins_async"
c:identifier="gst_install_plugins_async"
doc="Requests plugin installation without blocking. Once the plugins have been
installed or installation has failed, @func will be called with the result
of the installation and your provided @user_data pointer.
This function requires a running GLib/Gtk main loop. If you are not
running a GLib/Gtk main loop, make sure to regularly call
g_main_context_iteration(NULL,FALSE).
The installer strings that make up @detail are typically obtained by
calling gst_missing_plugin_message_get_installer_detail() on missing-plugin
messages that have been caught on a pipeline&apos;s bus or created by the
application via the provided API, such as gst_missing_element_message_new().
It is possible to request the installation of multiple missing plugins in
one go (as might be required if there is a demuxer for a certain format
installed but no suitable video decoder and no suitable audio decoder)."
version="0.10.12">
<return-value transfer-ownership="full">
<type name="InstallPluginsReturn" c:type="GstInstallPluginsReturn"/>
</return-value>
<parameters>
<parameter name="details" transfer-ownership="none">
<array c:type="gchar**">
<type name="utf8"/>
</array>
</parameter>
<parameter name="ctx" transfer-ownership="none">
<type name="InstallPluginsContext"
c:type="GstInstallPluginsContext*"/>
</parameter>
<parameter name="func"
transfer-ownership="none"
scope="call"
closure="3">
<type name="InstallPluginsResultFunc"
c:type="GstInstallPluginsResultFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none">
<type name="any" c:type="gpointer"/>
</parameter>
</parameters>
</function>
<function name="install_plugins_installation_in_progress"
c:identifier="gst_install_plugins_installation_in_progress"
doc="Checks whether plugin installation (initiated by this application only)
is currently in progress."
version="0.10.12">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
</function>
<function name="install_plugins_return_get_name"
c:identifier="gst_install_plugins_return_get_name"
doc="Convenience function to return the descriptive string associated
with a status code. This function returns English strings and
should not be used for user messages. It is here only to assist
in debugging."
version="0.10.12">
<return-value transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="ret" transfer-ownership="none">
<type name="InstallPluginsReturn" c:type="GstInstallPluginsReturn"/>
</parameter>
</parameters>
</function>
<function name="install_plugins_supported"
c:identifier="gst_install_plugins_supported"
doc="Checks whether plugin installation is likely to be supported by the
current environment. This currently only checks whether the helper script
that is to be provided by the distribution or operating system vendor
exists."
version="0.10.15">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
</function>
<function name="install_plugins_sync"
c:identifier="gst_install_plugins_sync"
doc="Requests plugin installation and block until the plugins have been
installed or installation has failed.
This function should almost never be used, it only exists for cases where
a non-GLib main loop is running and the user wants to run it in a separate
thread and marshal the result back asynchronously into the main thread
using the other non-GLib main loop. You should almost always use
gst_install_plugins_async() instead of this function."
version="0.10.12">
<return-value transfer-ownership="full">
<type name="InstallPluginsReturn" c:type="GstInstallPluginsReturn"/>
</return-value>
<parameters>
<parameter name="details" transfer-ownership="none">
<array c:type="gchar**">
<type name="utf8"/>
</array>
</parameter>
<parameter name="ctx" transfer-ownership="none">
<type name="InstallPluginsContext"
c:type="GstInstallPluginsContext*"/>
</parameter>
</parameters>
</function>
<function name="is_missing_plugin_message"
c:identifier="gst_is_missing_plugin_message"
doc="Checks whether @msg is a missing plugins message.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="msg" transfer-ownership="none">
<type name="Gst.Message" c:type="GstMessage*"/>
</parameter>
</parameters>
</function>
<function name="missing_decoder_installer_detail_new"
c:identifier="gst_missing_decoder_installer_detail_new"
doc="Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async() or gst_install_plugins_sync().
This function is mainly for applications that call external plugin
installation mechanisms using one of the two above-mentioned functions in
the case where the application knows exactly what kind of plugin it is
missing.
with g_free() when not needed any longer."
version="0.10.15">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="decode_caps"
transfer-ownership="none"
doc="caps for which a decoder element is needed">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="missing_decoder_message_new"
c:identifier="gst_missing_decoder_message_new"
doc="Creates a missing-plugin message for @element to notify the application
that a decoder element for a particular set of (fixed) caps is missing.
This function is mainly for use in plugins.">
<return-value transfer-ownership="full">
<type name="Gst.Message" c:type="GstMessage*"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="decode_caps"
transfer-ownership="none"
doc="caps for which a decoder element is needed">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="missing_element_installer_detail_new"
c:identifier="gst_missing_element_installer_detail_new"
doc="e.g. &quot;videoscale&quot; or &quot;cdparanoiasrc&quot;
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async() or gst_install_plugins_sync().
This function is mainly for applications that call external plugin
installation mechanisms using one of the two above-mentioned functions in
the case where the application knows exactly what kind of plugin it is
missing.
with g_free() when not needed any longer."
version="0.10.15">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="factory_name" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="missing_element_message_new"
c:identifier="gst_missing_element_message_new"
doc="e.g. &quot;videoscale&quot; or &quot;cdparanoiasrc&quot;
Creates a missing-plugin message for @element to notify the application
that a certain required element is missing. This function is mainly for
use in plugins.">
<return-value transfer-ownership="full">
<type name="Gst.Message" c:type="GstMessage*"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="factory_name" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="missing_encoder_installer_detail_new"
c:identifier="gst_missing_encoder_installer_detail_new"
doc="Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async() or gst_install_plugins_sync().
This function is mainly for applications that call external plugin
installation mechanisms using one of the two above-mentioned functions in
the case where the application knows exactly what kind of plugin it is
missing.
with g_free() when not needed any longer."
version="0.10.15">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="encode_caps"
transfer-ownership="none"
doc="caps for which an encoder element is needed">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="missing_encoder_message_new"
c:identifier="gst_missing_encoder_message_new"
doc="Creates a missing-plugin message for @element to notify the application
that an encoder element for a particular set of (fixed) caps is missing.
This function is mainly for use in plugins.">
<return-value transfer-ownership="full">
<type name="Gst.Message" c:type="GstMessage*"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="encode_caps"
transfer-ownership="none"
doc="caps for which an encoder element is needed">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="missing_plugin_message_get_description"
c:identifier="gst_missing_plugin_message_get_description"
doc="Returns a localised string describing the missing feature, for use in
error dialogs and the like. Should never return NULL unless @msg is not
a valid missing-plugin message.
This function is mainly for applications that need a human-readable string
describing a missing plugin, given a previously collected missing-plugin
message
string with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="msg" transfer-ownership="none">
<type name="Gst.Message" c:type="GstMessage*"/>
</parameter>
</parameters>
</function>
<function name="missing_plugin_message_get_installer_detail"
c:identifier="gst_missing_plugin_message_get_installer_detail"
doc="Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async() or gst_install_plugins_sync().
This function is mainly for applications that call external plugin
installation mechanisms using one of the two above-mentioned functions.
with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="msg" transfer-ownership="none">
<type name="Gst.Message" c:type="GstMessage*"/>
</parameter>
</parameters>
</function>
<function name="missing_uri_sink_installer_detail_new"
c:identifier="gst_missing_uri_sink_installer_detail_new"
doc="e.g. &quot;http&quot; or &quot;mms&quot;
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async() or gst_install_plugins_sync().
This function is mainly for applications that call external plugin
installation mechanisms using one of the two above-mentioned functions in
the case where the application knows exactly what kind of plugin it is
missing.
with g_free() when not needed any longer."
version="0.10.15">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="protocol" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="missing_uri_sink_message_new"
c:identifier="gst_missing_uri_sink_message_new"
doc="e.g. &quot;http&quot; or &quot;smb&quot;
Creates a missing-plugin message for @element to notify the application
that a sink element for a particular URI protocol is missing. This
function is mainly for use in plugins.">
<return-value transfer-ownership="full">
<type name="Gst.Message" c:type="GstMessage*"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="protocol" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="missing_uri_source_installer_detail_new"
c:identifier="gst_missing_uri_source_installer_detail_new"
doc="e.g. &quot;http&quot; or &quot;mms&quot;
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async() or gst_install_plugins_sync().
This function is mainly for applications that call external plugin
installation mechanisms using one of the two above-mentioned functions in
the case where the application knows exactly what kind of plugin it is
missing.
with g_free() when not needed any longer."
version="0.10.15">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="protocol" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="missing_uri_source_message_new"
c:identifier="gst_missing_uri_source_message_new"
doc="e.g. &quot;http&quot; or &quot;mms&quot;
Creates a missing-plugin message for @element to notify the application
that a source element for a particular URI protocol is missing. This
function is mainly for use in plugins.">
<return-value transfer-ownership="full">
<type name="Gst.Message" c:type="GstMessage*"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="protocol" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_add_codec_description_to_tag_list"
c:identifier="gst_pb_utils_add_codec_description_to_tag_list"
doc="#GST_TAG_VIDEO_CODEC or #GST_TAG_CODEC
Adds a codec tag describing the format specified by @caps to @taglist.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="taglist" transfer-ownership="none">
<type name="Gst.TagList" c:type="GstTagList*"/>
</parameter>
<parameter name="codec_tag" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="caps"
transfer-ownership="none"
doc="#GstCaps for which a codec tag should be added.">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_get_codec_description"
c:identifier="gst_pb_utils_get_codec_description"
doc="Returns a localised (as far as this is possible) string describing the
media format specified in @caps, for use in error dialogs or other messages
to be seen by the user. Should never return NULL unless @caps is invalid.
Also see the convenience function
gst_pb_utils_add_codec_description_to_tag_list().
string with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="caps"
transfer-ownership="none"
doc="#GstCaps for which an format description is needed">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_get_decoder_description"
c:identifier="gst_pb_utils_get_decoder_description"
doc="Returns a localised string describing an decoder for the format specified
in @caps, for use in error dialogs or other messages to be seen by the user.
Should never return NULL unless @factory_name or @caps are invalid.
This function is mainly for internal use, applications would typically
use gst_missing_plugin_message_get_description() to get a description of
a missing feature from a missing-plugin message.
string with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="caps"
transfer-ownership="none"
doc="#GstCaps for which an decoder description is needed">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_get_element_description"
c:identifier="gst_pb_utils_get_element_description"
doc="Returns a localised string describing the given element, for use in
error dialogs or other messages to be seen by the user. Should never
return NULL unless @factory_name is invalid.
This function is mainly for internal use, applications would typically
use gst_missing_plugin_message_get_description() to get a description of
a missing feature from a missing-plugin message.
string with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="factory_name" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_get_encoder_description"
c:identifier="gst_pb_utils_get_encoder_description"
doc="Returns a localised string describing an encoder for the format specified
in @caps, for use in error dialogs or other messages to be seen by the user.
Should never return NULL unless @factory_name or @caps are invalid.
This function is mainly for internal use, applications would typically
use gst_missing_plugin_message_get_description() to get a description of
a missing feature from a missing-plugin message.
string with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="caps"
transfer-ownership="none"
doc="#GstCaps for which an encoder description is needed">
<type name="Gst.Caps" c:type="GstCaps*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_get_sink_description"
c:identifier="gst_pb_utils_get_sink_description"
doc="Returns a localised string describing a sink element handling the protocol
specified in @protocol, for use in error dialogs or other messages to be
seen by the user. Should never return NULL unless @protocol is invalid.
This function is mainly for internal use, applications would typically
use gst_missing_plugin_message_get_description() to get a description of
a missing feature from a missing-plugin message.
string with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="protocol" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_get_source_description"
c:identifier="gst_pb_utils_get_source_description"
doc="Returns a localised string describing a source element handling the protocol
specified in @protocol, for use in error dialogs or other messages to be
seen by the user. Should never return NULL unless @protocol is invalid.
This function is mainly for internal use, applications would typically
use gst_missing_plugin_message_get_description() to get a description of
a missing feature from a missing-plugin message.
string with g_free() when not needed any longer.">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="protocol" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
<function name="pb_utils_init"
c:identifier="gst_pb_utils_init"
doc="Initialises the base utils support library. This function is not
thread-safe. Applications should call it after calling gst_init(),
plugins should call it from their plugin_init function.
This function may be called multiple times. It will do nothing if the
library has already been initialised."
version="0.10.12">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</function>
</namespace>
</repository>

View File

@ -0,0 +1,16 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.libraries combinators kernel system
gobject-introspection glib.ffi gstreamer.ffi ;
IN: gstreamer.pbutils.ffi
<<
"gstreamer.pbutils" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstpbutils-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/pbutils/GstPbutils-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.pbutils.ffi ;
IN: gstreamer.pbutils

View File

@ -0,0 +1,983 @@
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.0"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GLib" version="2.0"/>
<include name="GModule" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gst" version="0.10"/>
<include name="GstAudio" version="0.10"/>
<include name="GstBase" version="0.10"/>
<include name="GstInterfaces" version="0.10"/>
<include name="GstTag" version="0.10"/>
<include name="libxml2" version="2.0"/>
<package name="gstreamer-0.10"/>
<package name="gstreamer-audio-0.10"/>
<package name="gstreamer-interfaces-0.10"/>
<package name="gstreamer-tag-0.10"/>
<c:include name="gst/riff/riff-ids.h"/>
<c:include name="gst/riff/riff-media.h"/>
<c:include name="gst/riff/riff-read.h"/>
<namespace name="GstRiff"
version="0.10"
shared-library="libgstriff-0.10.so.0"
c:prefix="Gst">
<constant name="IBM_FORMAT_ADPCM" value="259">
<type name="int"/>
</constant>
<constant name="IBM_FORMAT_ALAW" value="258">
<type name="int"/>
</constant>
<constant name="IBM_FORMAT_MULAW" value="257">
<type name="int"/>
</constant>
<constant name="IF_KEYFRAME" value="16">
<type name="int"/>
</constant>
<constant name="IF_LIST" value="1">
<type name="int"/>
</constant>
<constant name="IF_NO_TIME" value="256">
<type name="int"/>
</constant>
<constant name="STRH_DISABLED" value="1">
<type name="int"/>
</constant>
<constant name="STRH_VIDEOPALCHANGES" value="65536">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_A52" value="8192">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_AAC" value="255">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_AAC_AC" value="16707">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_AAC_pm" value="28781">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ADPCM" value="2">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ADPCM_IMA_DK3" value="98">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ADPCM_IMA_DK4" value="97">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ADPCM_IMA_WAV" value="105">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ALAW" value="6">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_AMR_NB" value="87">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_AMR_WB" value="88">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_APTX" value="37">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_AUDIOFILE_AF10" value="38">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_AUDIOFILE_AF36" value="36">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_BTV_DIGITAL" value="1024">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CANOPUS_ATRAC" value="99">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CIRRUS" value="96">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CONTROL_RES_CR10" value="55">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CONTROL_RES_VQLPC" value="52">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CREATIVE_ADPCM" value="512">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CREATIVE_FASTSPEECH10" value="515">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CREATIVE_FASTSPEECH8" value="514">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CS2" value="608">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CS_IMAADPCM" value="57">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_CU_CODEC" value="25">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DF_G726" value="133">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DF_GSM610" value="134">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DIALOGIC_OKI_ADPCM" value="23">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DIGIADPCM" value="54">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DIGIFIX" value="22">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DIGIREAL" value="53">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DIGISTD" value="21">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DIGITAL_G723" value="291">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DOLBY_AC2" value="48">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DOLBY_AC3_SPDIF" value="146">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DSAT_DISPLAY" value="103">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DSP_TRUESPEECH" value="34">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DTS" value="8193">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_DVI_ADPCM" value="17">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ECHOSC1" value="35">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ECHOSC3" value="58">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ESPCM" value="97">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_EXTENSIBLE" value="65534">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_FLAC" value="61868">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_FM_TOWNS_SND" value="768">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_G722_ADPCM" value="101">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_G723_ADPCM" value="20">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_G726ADPCM" value="320">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_G726_ADPCM" value="100">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_G728_CELP" value="65">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_G729A" value="131">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_GSM610" value="49">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_GSM_AMR_CBR" value="31265">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_GSM_AMR_VBR" value="31266">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_IBM_CVSD" value="5">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_IEEE_FLOAT" value="3">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ILINK_VC" value="560">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_IMC" value="1025">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_IPI_HSX" value="592">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_IPI_RPELP" value="593">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ISIAUDIO" value="136">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ITU_G721_ADPCM" value="64">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_LH_CODEC" value="4352">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_LRC" value="40">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_LUCENT_G723" value="89">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MALDEN_PHONYTALK" value="160">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MEDIASONIC_G723" value="147">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MEDIASPACE_ADPCM" value="18">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MEDIAVISION_ADPCM" value="24">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MPEGL12" value="80">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MPEGL3" value="85">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MSG723" value="66">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MSN" value="50">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MSRT24" value="130">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MULAW" value="7">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_MVI_MVI2" value="132">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_NMS_VBXADPCM" value="56">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_NORRIS" value="5120">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_OKI_ADPCM" value="16">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_OLIADPCM" value="4097">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_OLICELP" value="4098">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_OLIGSM" value="4096">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_OLIOPR" value="4100">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_OLISBC" value="4099">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ONLIVE" value="137">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_PAC" value="83">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_PACKED" value="153">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_PCM" value="1">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_PHILIPS_LPCBB" value="152">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_PROSODY_1612" value="39">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_PROSODY_8KBPS" value="148">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_QDESIGN_MUSIC" value="1104">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_QUALCOMM_HALFRATE" value="337">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_QUALCOMM_PUREVOICE" value="336">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_QUARTERDECK" value="544">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_RAW_SPORT" value="576">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_RHETOREX_ADPCM" value="256">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ROCKWELL_ADPCM" value="59">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ROCKWELL_DIGITALK" value="60">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_RT24" value="82">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SANYO_LD_ADPCM" value="293">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SBC24" value="145">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIERRA_ADPCM" value="19">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIPROLAB_ACELP4800" value="305">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIPROLAB_ACELP8V3" value="306">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIPROLAB_ACEPLNET" value="304">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIPROLAB_G729" value="307">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIPROLAB_G729A" value="308">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIPROLAB_KELVIN" value="309">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SIREN" value="654">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SOFTSOUND" value="128">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SONARC" value="33">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SONIC" value="8264">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SONIC_LS" value="8264">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SONY_ATRAC3" value="624">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_SOUNDSPACE_MUSICOMPRESS" value="5376">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_TPC" value="1665">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_TUBGSM" value="341">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_UHER_ADPCM" value="528">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_UNKNOWN" value="0">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VIVO_G723" value="273">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VIVO_SIREN" value="274">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VME_VMPCM" value="1664">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VORBIS1" value="26447">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VORBIS1PLUS" value="26479">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VORBIS2" value="26448">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VORBIS2PLUS" value="26480">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VORBIS3" value="26449">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VORBIS3PLUS" value="26481">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE" value="98">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_AC10" value="113">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_AC16" value="114">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_AC20" value="115">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_AC8" value="112">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_BYTE_ALIGNED" value="105">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_METASOUND" value="117">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_METAVOICE" value="116">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_RT29HW" value="118">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_TQ40" value="121">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_TQ60" value="129">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_VR12" value="119">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VOXWARE_VR18" value="120">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_VSELP" value="4">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_WMAV1" value="352">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_WMAV2" value="353">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_WMAV3" value="354">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_WMAV3_L" value="355">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_WMS" value="10">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_XEBEC" value="61">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_YAMAHA_ADPCM" value="32">
<type name="int"/>
</constant>
<constant name="WAVE_FORMAT_ZYXEL_ADPCM" value="151">
<type name="int"/>
</constant>
<function name="create_audio_caps"
c:identifier="gst_riff_create_audio_caps">
<return-value transfer-ownership="full">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
<parameters>
<parameter name="codec_id" transfer-ownership="none">
<type name="uint16" c:type="guint16"/>
</parameter>
<parameter name="strh" transfer-ownership="none">
<type name="riff_strh" c:type="gst_riff_strh*"/>
</parameter>
<parameter name="strf" transfer-ownership="none">
<type name="riff_strf_auds" c:type="gst_riff_strf_auds*"/>
</parameter>
<parameter name="strf_data" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="strd_data" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="codec_name" transfer-ownership="none">
<array c:type="char**">
<type name="utf8"/>
</array>
</parameter>
</parameters>
</function>
<function name="create_audio_template_caps"
c:identifier="gst_riff_create_audio_template_caps">
<return-value transfer-ownership="full">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
</function>
<function name="create_iavs_caps" c:identifier="gst_riff_create_iavs_caps">
<return-value transfer-ownership="full">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
<parameters>
<parameter name="codec_fcc" transfer-ownership="none">
<type name="uint32" c:type="guint32"/>
</parameter>
<parameter name="strh" transfer-ownership="none">
<type name="riff_strh" c:type="gst_riff_strh*"/>
</parameter>
<parameter name="strf" transfer-ownership="none">
<type name="riff_strf_iavs" c:type="gst_riff_strf_iavs*"/>
</parameter>
<parameter name="strf_data" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="strd_data" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="codec_name" transfer-ownership="none">
<array c:type="char**">
<type name="utf8"/>
</array>
</parameter>
</parameters>
</function>
<function name="create_iavs_template_caps"
c:identifier="gst_riff_create_iavs_template_caps">
<return-value transfer-ownership="full">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
</function>
<function name="create_video_caps"
c:identifier="gst_riff_create_video_caps"
doc="data that is within the range of strf.size, but excluding any
additional data withint this chunk but outside strf.size.
chunk outside reach of strf.size. Ususally a palette.
chunk. Usually codec initialization data.">
<return-value transfer-ownership="full">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
<parameters>
<parameter name="codec_fcc" transfer-ownership="none">
<type name="uint32" c:type="guint32"/>
</parameter>
<parameter name="strh" transfer-ownership="none">
<type name="riff_strh" c:type="gst_riff_strh*"/>
</parameter>
<parameter name="strf" transfer-ownership="none">
<type name="riff_strf_vids" c:type="gst_riff_strf_vids*"/>
</parameter>
<parameter name="strf_data" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="strd_data" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="codec_name" transfer-ownership="none">
<array c:type="char**">
<type name="utf8"/>
</array>
</parameter>
</parameters>
</function>
<function name="create_video_template_caps"
c:identifier="gst_riff_create_video_template_caps">
<return-value transfer-ownership="full">
<type name="Gst.Caps" c:type="GstCaps*"/>
</return-value>
</function>
<function name="init"
c:identifier="gst_riff_init"
doc="Initialize riff library.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</function>
<function name="parse_chunk"
c:identifier="gst_riff_parse_chunk"
doc="by the read size by this function.
chunk data, which may be NULL if chunksize == 0
Reads a single chunk.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="buf" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="offset" direction="out" transfer-ownership="full">
<type name="uint" c:type="guint*"/>
</parameter>
<parameter name="fourcc" direction="out" transfer-ownership="full">
<type name="uint32" c:type="guint32*"/>
</parameter>
<parameter name="chunk_data"
transfer-ownership="none"
doc="containing the">
<type name="Gst.Buffer" c:type="GstBuffer**"/>
</parameter>
</parameters>
</function>
<function name="parse_file_header"
c:identifier="gst_riff_parse_file_header"
doc="should be at least 12 bytes long.
type of document (according to the header).
Reads the first few bytes from the provided buffer, checks
if this stream is a RIFF stream, and determines document type.
This function takes ownership of @buf so it should not be used anymore
after calling this function.
caller should error out; we already throw an error), or TRUE
if it is.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="buf" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="doctype"
direction="out"
transfer-ownership="full"
doc="to indicate the">
<type name="uint32" c:type="guint32*"/>
</parameter>
</parameters>
</function>
<function name="parse_info"
c:identifier="gst_riff_parse_info"
doc="containing information about this stream. May be
NULL if no supported tags were found.
Parses stream metadata from input data.">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="buf" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="taglist" transfer-ownership="none">
<type name="Gst.TagList" c:type="GstTagList**"/>
</parameter>
</parameters>
</function>
<function name="parse_strf_auds"
c:identifier="gst_riff_parse_strf_auds"
doc="strf/auds structure. Caller should free it.
containing extradata for this particular stream (e.g.
codec initialization data).
Parses an audio stream´s strf structure plus optionally some
extradata from input data. This function takes ownership of @buf.
use.
should be skipped on error, but it is not fatal.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="buf" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="strf" transfer-ownership="none" doc="to a filled-in">
<type name="riff_strf_auds" c:type="gst_riff_strf_auds**"/>
</parameter>
<parameter name="data" transfer-ownership="none" doc="to a buffer">
<type name="Gst.Buffer" c:type="GstBuffer**"/>
</parameter>
</parameters>
</function>
<function name="parse_strf_iavs"
c:identifier="gst_riff_parse_strf_iavs"
doc="strf/iavs structure. Caller should free it.
containing extradata for this particular stream (e.g.
codec initialization data).
Parses a interleaved (also known as &quot;complex&quot;) stream´s strf
structure plus optionally some extradata from input data. This
function takes ownership of @buf.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="buf" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="strf" transfer-ownership="none" doc="to a filled-in">
<type name="riff_strf_iavs" c:type="gst_riff_strf_iavs**"/>
</parameter>
<parameter name="data" transfer-ownership="none" doc="to a buffer">
<type name="Gst.Buffer" c:type="GstBuffer**"/>
</parameter>
</parameters>
</function>
<function name="parse_strf_vids"
c:identifier="gst_riff_parse_strf_vids"
doc="strf/vids structure. Caller should free it.
containing extradata for this particular stream (e.g.
palette, codec initialization data).
Parses a video stream´s strf structure plus optionally some
extradata from input data. This function takes ownership of @buf.
should be skipped on error, but it is not fatal.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="buf" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="strf" transfer-ownership="none" doc="to a filled-in">
<type name="riff_strf_vids" c:type="gst_riff_strf_vids**"/>
</parameter>
<parameter name="data" transfer-ownership="none" doc="to a buffer">
<type name="Gst.Buffer" c:type="GstBuffer**"/>
</parameter>
</parameters>
</function>
<function name="parse_strh"
c:identifier="gst_riff_parse_strh"
doc="strh structure. Caller should free it.
Parses a strh structure from input data. Takes ownership of @buf.
should be skipped on error, but it is not fatal.">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="buf" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer*"/>
</parameter>
<parameter name="strh" transfer-ownership="none" doc="to a filled-in">
<type name="riff_strh" c:type="gst_riff_strh**"/>
</parameter>
</parameters>
</function>
<function name="read_chunk"
c:identifier="gst_riff_read_chunk"
doc="Reads a single chunk of data. Since 0.10.8 &apos;JUNK&apos; chunks
are skipped automatically.">
<return-value transfer-ownership="full">
<type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
</return-value>
<parameters>
<parameter name="element" transfer-ownership="none">
<type name="Gst.Element" c:type="GstElement*"/>
</parameter>
<parameter name="pad" transfer-ownership="none">
<type name="Gst.Pad" c:type="GstPad*"/>
</parameter>
<parameter name="offset" direction="out" transfer-ownership="full">
<type name="uint64" c:type="guint64*"/>
</parameter>
<parameter name="tag" direction="out" transfer-ownership="full">
<type name="uint32" c:type="guint32*"/>
</parameter>
<parameter name="chunk_data" transfer-ownership="none">
<type name="Gst.Buffer" c:type="GstBuffer**"/>
</parameter>
</parameters>
</function>
<record name="riff_acid" c:type="_gst_riff_acid">
<field name="loop_type" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="root_note" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="unknown1" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="unknown2" writable="1">
<type name="float" c:type="gfloat"/>
</field>
<field name="number_of_beats" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="meter_d" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="meter_n" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="tempo" writable="1">
<type name="float" c:type="gfloat"/>
</field>
</record>
<record name="riff_dmlh" c:type="_gst_riff_dmlh">
<field name="totalframes" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
</record>
<record name="riff_index_entry" c:type="_gst_riff_index_entry">
<field name="id" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="flags" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="offset" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="size" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
</record>
<record name="riff_strf_auds" c:type="_gst_riff_strf_auds">
<field name="format" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="channels" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="rate" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="av_bps" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="blockalign" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="size" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
</record>
<record name="riff_strf_iavs" c:type="_gst_riff_strf_iavs">
<field name="DVAAuxSrc" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="DVAAuxCtl" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="DVAAuxSrc1" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="DVAAuxCtl1" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="DVVAuxSrc" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="DVVAuxCtl" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="DVReserved1" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="DVReserved2" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
</record>
<record name="riff_strf_vids" c:type="_gst_riff_strf_vids">
<field name="size" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="width" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="height" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="planes" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="bit_cnt" writable="1">
<type name="uint16" c:type="guint16"/>
</field>
<field name="compression" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="image_size" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="xpels_meter" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="ypels_meter" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="num_colors" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="imp_colors" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
</record>
<record name="riff_strh" c:type="_gst_riff_strh">
<field name="type" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="fcc_handler" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="flags" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="priority" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="init_frames" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="scale" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="rate" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="start" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="length" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="bufsize" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="quality" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
<field name="samplesize" writable="1">
<type name="uint32" c:type="guint32"/>
</field>
</record>
</namespace>
</repository>

View File

@ -0,0 +1,27 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.syntax alien.libraries combinators kernel
system
gobject-introspection glib.ffi gmodule.ffi gobject.ffi ;
EXCLUDE: alien.c-types => pointer ;
IN: gstreamer.ffi
<<
"gstreamer" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstreamer-0.10.so" cdecl add-library ] }
} cond
>>
TYPEDEF: gpointer GstClockID
TYPEDEF: guint64 GstClockTime
TYPEDEF: gint64 GstClockTimeDiff
! types from libxml2
TYPEDEF: void* xmlNodePtr
TYPEDEF: void* xmlDocPtr
TYPEDEF: void* xmlNsPtr
GIR: vocab:gstreamer/Gst-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.ffi ;
IN: gstreamer

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.libraries combinators kernel system
gobject-introspection glib.ffi gstreamer.base.ffi gstreamer.ffi ;
IN: gstreamer.rtp.ffi
<<
"gstreamer.rtp" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstrtp-0.10.so" cdecl add-library ] }
} cond
>>
GIR: vocab:gstreamer/rtp/GstRtp-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.rtp.ffi ;
IN: gstreamer.rtp

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.syntax alien.libraries combinators kernel
system
gobject-introspection glib.ffi gstreamer.ffi gstreamer.sdp.ffi ;
IN: gstreamer.rtsp.ffi
<<
"gstreamer.rtsp" {
{ [ os winnt? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstrtsp-0.10.so" cdecl add-library ] }
} cond
>>
! git error (there is _GstRTSPTransport only in .gir)
C-TYPE: GstRTSPTransport
GIR: vocab:gstreamer/rtsp/GstRtsp-0.10.gir

View File

@ -0,0 +1,5 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: gstreamer.rtsp.ffi ;
IN: gstreamer.rtsp

Some files were not shown because too many files have changed in this diff Show More