X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fswig%2Fmltpp.i;fp=mlt%2B%2B%2Fswig%2Fmltpp.i;h=0000000000000000000000000000000000000000;hb=27f0329aa8f434794f1f18e018fc3221e58b77a4;hp=f6060b739d4c38f17679011d813388a60c5ba908;hpb=f5a43889f0ea29962f2d32b5dab0fcd25bebb945;p=melted diff --git a/mlt++/swig/mltpp.i b/mlt++/swig/mltpp.i deleted file mode 100644 index f6060b7..0000000 --- a/mlt++/swig/mltpp.i +++ /dev/null @@ -1,150 +0,0 @@ -/** - * mltpp.i - Swig Bindings for mlt++ - * Copyright (C) 2004-2005 Charles Yates - * Author: Charles Yates - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -%module mltpp -%include "carrays.i" -%array_class(unsigned char, unsignedCharArray); - -%{ -#include -%} - -/** These methods return objects which should be gc'd. - */ - -namespace Mlt { -%newobject Factory::init( const char * ); -%newobject Factory::producer( Profile &, char *, char * ); -%newobject Factory::filter( Profile &, char *, char * ); -%newobject Factory::transition( Profile &, char *, char * ); -%newobject Factory::consumer( Profile &, char *, char * ); -%newobject Properties::listen( char *, void *, mlt_listener ); -%newobject Service::producer( ); -%newobject Service::consumer( ); -%newobject Service::get_frame( int ); -%newobject Service::filter( int ); -%newobject Producer::filter( int ); -%newobject Producer::cut( int, int ); -%newobject Playlist::current( ); -%newobject Playlist::clip_info( int ); -%newobject Playlist::get_clip( int ); -%newobject Multitrack::track( int ); -%newobject Tractor::multitrack( ); -%newobject Tractor::field( ); -%newobject Tractor::track( int ); -%newobject Frame::get_original_producer( ); -%newobject Miracle::execute( char * ); -%newobject Miracle::push( char *, Service & ); -%newobject Miracle::unit( int ); -%newobject Repository::consumers( ); -%newobject Repository::filters( ); -%newobject Repository::producers( ); -%newobject Repository::transitions( ); -%newobject Repository::metadata( mlt_service_type, const char * ); -} - -/** Classes to wrap. - */ - -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include - -#if defined(SWIGRUBY) - -%{ - -static void ruby_listener( mlt_properties owner, void *object ); - -class RubyListener -{ - private: - VALUE callback; - Mlt::Event *event; - - public: - RubyListener( Mlt::Properties &properties, char *id, VALUE callback ) : - callback( callback ) - { - event = properties.listen( id, this, ( mlt_listener )ruby_listener ); - } - - ~RubyListener( ) - { - delete event; - } - - void mark( ) - { - ((void (*)(VALUE))(rb_gc_mark))( callback ); - } - - void doit( ) - { - ID method = rb_intern( "call" ); - rb_funcall( callback, method, 0 ); - } -}; - -static void ruby_listener( mlt_properties owner, void *object ) -{ - RubyListener *o = static_cast< RubyListener * >( object ); - o->doit( ); -} - -void markRubyListener( void* p ) -{ - RubyListener *o = static_cast( p ); - o->mark( ); -} - -%} - -// Ruby wrapper -%rename( Listener ) RubyListener; -%markfunc RubyListener "markRubyListener"; - -class RubyListener -{ - public: - RubyListener( Mlt::Properties &properties, char *id, VALUE callback ); -}; - -#endif -