]> git.sesse.net Git - mlt/commitdiff
Fixup the swig bindings.
authorDan Dennedy <dan@dennedy.org>
Sat, 9 May 2009 22:57:21 +0000 (15:57 -0700)
committerDan Dennedy <dan@dennedy.org>
Sat, 9 May 2009 22:57:21 +0000 (15:57 -0700)
Signed-off-by: Dan Dennedy <dan@dennedy.org>
12 files changed:
src/swig/configure
src/swig/java/Play.java
src/swig/java/build
src/swig/mlt.i [moved from src/swig/mltpp.i with 99% similarity]
src/swig/perl/Makefile.PL
src/swig/php/build [changed mode: 0644->0755]
src/swig/python/build
src/swig/ruby/build
src/swig/ruby/play.rb
src/swig/ruby/thumbs.rb
src/swig/tcl/build
src/swig/tcl/play.tcl

index 44fe6ee52d8549efb605215c82e04b5cdf189ffd..3c21e5f64fbb0f93b845c6d396a2ee2a213f3704 100755 (executable)
@@ -7,7 +7,7 @@ pkg-config mlt-framework --cflags > /dev/null 2>&1
 [ $? != 0 ] && echo "Please install mlt" && exit 1
 
 if [ "$1" = "all" ]
-then languages="perl php python ruby tcl"
+then languages="java perl php python ruby tcl"
 elif [ "$1" != "" ]
 then languages=$*
 else echo "Usage: ./configure [ all | language * ]"
@@ -25,7 +25,7 @@ do
        if [ -d "$i" ] 
        then
                cd $i &&
-               output=`./build 2>/dev/null`
+               output=`./build`
                if [ $? == 0 ]
                then echo "OK"
                        touch ../.$i
index b6f576c17e6cad2ec89e1bf65179f8010c2771dd..4c7043e96a42535dfe9e51a2d38776ad46b6414f 100644 (file)
@@ -1,4 +1,4 @@
-import net.sourceforge.mlt.*;
+import org.mltframework.*;
 
 public class Play {
 
index 6da401c5972178361282dcc481e4b2e06c8dac7b..5d1ffb8ef27bcc4122c9bdc6e07657d37dd37a89 100755 (executable)
@@ -9,16 +9,16 @@ then
        path=`dirname $path`
 
        # Change this as needed
-       export JAVA_INCLUDE="-I$path/include -I$path/include/linux"
+       export JAVA_INCLUDE="-I$path/include -I$path/include/linux"
 
-       ln -sf ../mltpp.i .
+       ln -sf ../mlt.i
 
        # Invoke swig
-       mkdir -p src_swig/net/sourceforge/mlt
-       swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -java -outdir src_swig/net/sourceforge/mlt -package net.sourceforge.mlt mltpp.i || exit $?
+       mkdir -p src_swig/org/mltframework
+       swig -c++ -I../../mlt++ -I../.. -java -outdir src_swig/org/mltframework -package org.mltframework mlt.i || exit $?
 
        # Compile the wrapper
-       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../../mlt++ `pkg-config mlt-framework --cflags` mlt_wrap.cxx $JAVA_INCLUDE || exit $?
+       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx $JAVA_INCLUDE || exit $?
        
        # Create the module
        gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmlt_java.so || exit $?
similarity index 99%
rename from src/swig/mltpp.i
rename to src/swig/mlt.i
index 8014d6de63673ce53515f4e07bc2d6a94f628a34..84a7184d6f20148b988da9b2d860ea390d13e9c5 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * mltpp.i - Swig Bindings for mlt++
+ * mlt.i - Swig Bindings for mlt++
  * Copyright (C) 2004-2005 Charles Yates
  * Author: Charles Yates <charles.yates@pandora.be>
  *
index e766beb67e85dc3da65a1d7363e876e53c9c92d3..2093b9411688d60b38463ab027a639b736d8a172 100644 (file)
@@ -3,11 +3,11 @@ use ExtUtils::MakeMaker;
 
 my $CXX = $ENV{'CXX'} || 'g++';
 
-system( "ln -sf ../mltpp.i ." );
-system( "swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -perl5 mltpp.i" ); 
+system( "ln -sf ../mlt.i" );
+system( "swig -c++ -I../../mlt++ -I../.. -perl5 mlt.i" ); 
 WriteMakefile(
        'NAME'    => 'mlt',
-       'CC'      => '${CXX} `pkg-config mlt-framework --cflags` -I../../mlt++',
+       'CC'      => '${CXX} -I../..',
        'OPTIMIZE' => '-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386',
        'LIBS'    => ['-L../../mlt++ -lmlt++'],
        'OBJECT'  => 'mlt_wrap.o',
old mode 100644 (file)
new mode 100755 (executable)
index 0df09ed..4074b87
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-ln -s ../mltpp.i
-swig -c++ -I../../mlt+++ `pkg-config --cflags mlt-framework` -php5 -noproxy mltpp.i
-g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread `pkg-config --cflags mlt-framework` `php-config --includes` mlt_wrap.cpp
-
+ln -sf ../mlt.i
+swig -c++ -I../../mlt++ -I../.. -php5 -noproxy mlt.i
+g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. `php-config --includes` mlt_wrap.cpp
+gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
index 160d84d4578696da04d717d98746083ce6b58904..a4ad605a111401c743fa3ce75c7d01b60e22d1f3 100755 (executable)
@@ -9,13 +9,13 @@ then
 
        [ ! -d "$PYTHON_INCLUDE" ] && echo python development missing && exit 1
 
-       ln -sf ../mltpp.i .
+       ln -sf ../mlt.i
 
        # Invoke swig
-       swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -python mltpp.i || exit $?
+       swig -c++ -I../../mlt++ -I../.. -python mlt.i || exit $?
 
        # Compile the wrapper
-       g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread `pkg-config mlt-framework --cflags` -I$PYTHON_INCLUDE mlt_wrap.cxx || exit $?
+       g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. -I$PYTHON_INCLUDE mlt_wrap.cxx || exit $?
 
        # Create the module
        gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o _mlt.so || exit $?
index edee47d59627d4433a95c3ae3f10afddae79ad33..4f4f1f198be00ad4c4438542625236b543e793f8 100755 (executable)
@@ -1,8 +1,8 @@
 #!/usr/bin/env ruby
 require 'mkmf'
-system( "ln -sf ../mltpp.i mltpp.i" )
-system( "swig -c++ -ruby -I../../mlt++ `pkg-config mlt-framework --cflags` mltpp.i" )
-$CFLAGS += " -I../../mlt++ `pkg-config mlt-framework --cflags`"
+system( "ln -sf ../mlt.i" )
+system( "swig -c++ -ruby -I../../mlt++ -I../.. mlt.i" )
+$CFLAGS += "-I../.."
 $LDFLAGS += " -L../../mlt++ -lmlt++"
 create_makefile('mlt')
 system( 'make' )
index 27b839f9fc135ee9f9f967330bc58b7a844ac8c8..fda7d5b0f5144eac173b2b9668c4780504b6925c 100755 (executable)
@@ -4,21 +4,21 @@
 require 'mlt'
 
 # Create the mlt system
-mlt::Factory::init
+Mlt::Factory::init
 
 # Establish the mlt profile
-profile = mlt::Profile.new
+profile = Mlt::Profile.new
 
 # Get and check the argument
 file = ARGV.shift
 raise "Usage: test.rb file" if file.nil?
 
 # Create the producer
-producer = mlt::Factory::producer( profile, file )
+producer = Mlt::Factory::producer( profile, file )
 raise "Unable to load #{file}" if !producer.is_valid
 
 # Create the consumer
-consumer = mlt::Consumer.new( profile, "sdl" )
+consumer = Mlt::Consumer.new( profile, "sdl" )
 raise "Unable to open sdl consumer" if !consumer.is_valid
 
 # Turn off the default rescaling
index 7e83a593b16cce43c6c32cb0d885b0990d3aa543..1b132e88211695e8c413bdc61a2caa0d79648059 100755 (executable)
@@ -4,10 +4,10 @@
 require 'mlt'
 
 # Create the mlt system
-mlt::Factory::init
+Mlt::Factory::init
 
 # Establish the mlt profile
-profile = mlt::Profile.new( "quarter_pal" )
+profile = Mlt::Profile.new( "quarter_pal" )
 
 # Get and check the argument
 file = ARGV.shift
@@ -17,11 +17,11 @@ size = "176x144" if size.nil?
 raise "Usage: thumbs.rb file name [ size ]" if file.nil? || name.nil?
 
 # Create the producer
-producer = mlt::Producer.new( profile, file )
+producer = Mlt::Producer.new( profile, file )
 raise "Unable to load #{file}" if !producer.is_valid
 
 # Construct the playlist
-playlist = mlt::Playlist.new( )
+playlist = Mlt::Playlist.new( )
 
 # Get the out point
 out = producer.get_int( "out" );
@@ -30,7 +30,7 @@ out = producer.get_int( "out" );
 [ 0, 0.25, 0.5, 0.75, 1 ].each { |x| playlist.append( producer, Integer(x*out), Integer(x*out) ) }
 
 # Create the thumb nail generator
-generator = mlt::Consumer.new( profile, "avformat", "#{name}%d.jpg" )
+generator = Mlt::Consumer.new( profile, "avformat", "#{name}%d.jpg" )
 generator.set( "real_time", "0" )
 generator.set( "progressive", "1" )
 generator.set( "s", size )
@@ -38,4 +38,3 @@ generator.set( "s", size )
 # Connect the consumer
 generator.connect( playlist );
 generator.run
-
index 03ebf28b657fa8ee3239d77090fced1e9f9c2ea3..53e44962f63410a3c29ff835b455a9d8d3412cc7 100755 (executable)
@@ -4,13 +4,13 @@ path=`which tclsh 2>/dev/null`
 
 if [ "$path" != "" ]
 then
-       ln -sf ../mltpp.i .
+       ln -sf ../mlt.i
 
        # Invoke swig
-       swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -tcl mltpp.i || exit 1
+       swig -c++ -I../../mlt++ -I../.. -tcl mlt.i || exit 1
 
        # Compile the wrapper
-       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../../mlt++ `pkg-config mlt-framework --cflags` mlt_wrap.cxx || exit 1
+       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit 1
 
        # Create the module
        gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit 1
index 1602eda8d11a7949892ba552b24419006bbcc1ad..bd511360597797e401589ab9c688ed04a678b42e 100755 (executable)
@@ -1,18 +1,17 @@
 #!/usr/bin/env tclsh
 
 load mlt.so
-mlt.Factory.init null
+Factory_init
 set profile [Profile]
 set arg1 [lindex $argv 0]
-set p [factory_producer $profile loader $arg1]
-set c [factory_consumer $profile sdl ""]
-set r [mlt_consumer_properties $c]
-mlt_properties_set $r "rescale" "none"
-consumer_connect $c $p
-mlt_consumer_start $c
-while { ![mlt_consumer_is_stopped $c] } {
+set p [Factory_producer $profile loader $arg1]
+set c [Factory_consumer $profile sdl ""]
+Properties_set $c "rescale" "none"
+Consumer_connect $c $p
+Consumer_start $c
+while { ![Consumer_is_stopped $c] } {
        after 1000
 }
-mlt_consumer_close $c
-mlt_producer_close $p
-factory_close
+delete_Consumer $c
+delete_Producer $p
+Factory_close