swig/java: fixup the java bindings build script and example (bug 1523941)
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 6 Aug 2008 04:19:40 +0000 (04:19 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 6 Aug 2008 04:19:40 +0000 (04:19 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@1170 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt++/swig/java/Play.java
mlt++/swig/java/Play.sh
mlt++/swig/java/build

index 3f6b4c8..35918db 100644 (file)
@@ -11,15 +11,18 @@ public class Play {
                // Start the mlt system
                Factory.init( null );
 
+               // Set the output profile
+               Profile profile = new Profile( "" );
+
                // Create the producer
-               Producer p = new Producer( args[0], null );
+               Producer p = new Producer( profile, args[0], null );
 
                if ( p.is_valid() ) {
          
                        p.set ("eof", "loop");
          
                        // Create the consumer
-                       Consumer c = new Consumer("sdl", null);
+                       Consumer c = new Consumer( profile, "sdl", null);
 
                        // Turn off the default rescaling
                        c.set("rescale", "none");
index 3bdc52c..f2ba015 100755 (executable)
@@ -1,2 +1,2 @@
-#!/bin/env sh
+#!/bin/sh
 java -Djava.library.path=. -cp .:src_swig Play "$@"
index 74c81e5..690dd29 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/bin/sh
 
 path=`which java 2> /dev/null`
 
@@ -15,13 +15,13 @@ then
 
        # Invoke swig
        mkdir -p src_swig/net/sourceforge/mltpp
-       swig -c++ -I/usr/local/include/mlt++ `mlt-config --cflags` -java -outdir src_swig/net/sourceforge/mltpp -package net.sourceforge.mltpp mltpp.i || exit $?
+       swig -c++ -I../../src `mlt-config --cflags` -java -outdir src_swig/net/sourceforge/mltpp -package net.sourceforge.mltpp mltpp.i || exit $?
 
        # Compile the wrapper
-       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I/usr/local/include/mlt++ `mlt-config --cflags` mltpp_wrap.cxx $JAVA_INCLUDE || exit $?
+       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../../src `mlt-config --cflags` mltpp_wrap.cxx $JAVA_INCLUDE || exit $?
        
        # Create the module
-       ld -shared mltpp_wrap.o -lmlt++ -o libmltpp_java.so || exit $?
+       ld -shared mltpp_wrap.o -L../../src -lmlt++ -o libmltpp_java.so || exit $?
 
        # Compile the test
        javac `find src_swig -name '*.java'` || exit $?