2 * mltpp.i - Swig Bindings for mlt++
3 * Copyright (C) 2004-2005 Charles Yates
4 * Author: Charles Yates <charles.yates@pandora.be>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 %array_class(unsigned char, unsignedCharArray);
26 #include <mlt++/Mlt.h>
29 /** These methods return objects which should be gc'd.
33 %newobject Factory::producer( char *, char * );
34 %newobject Factory::filter( char *, char * );
35 %newobject Factory::transition( char *, char * );
36 %newobject Factory::consumer( char *, char * );
37 %newobject Properties::listen( char *, void *, mlt_listener );
38 %newobject Service::producer( );
39 %newobject Service::consumer( );
40 %newobject Service::get_frame( int );
41 %newobject Service::filter( int );
42 %newobject Producer::filter( int );
43 %newobject Producer::cut( int, int );
44 %newobject Playlist::current( );
45 %newobject Playlist::clip_info( int );
46 %newobject Playlist::get_clip( int );
47 %newobject Multitrack::track( int );
48 %newobject Tractor::multitrack( );
49 %newobject Tractor::field( );
50 %newobject Tractor::track( int );
51 %newobject Frame::get_original_producer( );
52 %newobject Miracle::execute( char * );
53 %newobject Miracle::push( char *, Service & );
54 %newobject Miracle::unit( int );
60 %include <framework/mlt_types.h>
61 %include <framework/mlt_factory.h>
62 %include <MltFactory.h>
64 %include <MltProperties.h>
66 %include <MltGeometry.h>
67 %include <MltService.h>
68 %include <MltProducer.h>
69 %include <MltPlaylist.h>
70 %include <MltConsumer.h>
71 %include <MltFilter.h>
72 %include <MltTransition.h>
73 %include <MltMultitrack.h>
75 %include <MltTractor.h>
76 %include <MltParser.h>
77 %include <MltFilteredConsumer.h>
78 %include <MltMiracle.h>
79 %include <MltResponse.h>
85 static void ruby_listener( mlt_properties owner, void *object );
94 RubyListener( Mlt::Properties &properties, char *id, VALUE callback ) :
97 event = properties.listen( id, this, ( mlt_listener )ruby_listener );
107 ((void (*)(VALUE))(rb_gc_mark))( callback );
112 ID method = rb_intern( "call" );
113 rb_funcall( callback, method, 0 );
117 static void ruby_listener( mlt_properties owner, void *object )
119 RubyListener *o = static_cast< RubyListener * >( object );
123 void markRubyListener( void* p )
125 RubyListener *o = static_cast<RubyListener*>( p );
132 %rename( Listener ) RubyListener;
133 %markfunc RubyListener "markRubyListener";
138 RubyListener( Mlt::Properties &properties, char *id, VALUE callback );