From af426c53f818a8dac39e43b441dde261aa360536 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 18 Jun 2013 19:48:51 +0200 Subject: Add optional JOAL dependency, enabling JOAL usage for our 'av' package. Note: May be relocated to external project later! Assumption: gluegen/ joal/ jogl/ For OpenAL / JOAL code: - use the package jogamp.opengl.openal (like jogamp.opengl.android) - will be build _before_ the other 2nd pass java files - do not expose OpenAL/JOAL APIs, if being used by other packages, since only this package is being compiled w/ JOAL jar files! --- .classpath | 1 + make/build-common.xml | 19 ++++++++++++++ make/build-jogl.xml | 29 +++++++++++++++++++--- make/scripts/setenv-jogl.sh | 28 ++++++++++++++++++--- make/scripts/tests.sh | 11 +++++--- .../jogamp/opengl/openal/av/ALDummyUsage.java | 19 ++++++++++++++ 6 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java diff --git a/.classpath b/.classpath index 064f05938..41f50c091 100644 --- a/.classpath +++ b/.classpath @@ -32,5 +32,6 @@ + diff --git a/make/build-common.xml b/make/build-common.xml index dd33b1683..2061d55c9 100644 --- a/make/build-common.xml +++ b/make/build-common.xml @@ -19,6 +19,9 @@ + + + @@ -202,6 +205,8 @@ + + @@ -414,6 +419,13 @@ + + + + + + + @@ -427,6 +439,13 @@ + + + + + + + diff --git a/make/build-jogl.xml b/make/build-jogl.xml index ce532c2b4..f53c3ba29 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -125,6 +125,9 @@ + + @@ -1025,10 +1028,28 @@ + + + + + + + + + - + diff --git a/make/scripts/setenv-jogl.sh b/make/scripts/setenv-jogl.sh index 0945f44d1..b6df348dc 100755 --- a/make/scripts/setenv-jogl.sh +++ b/make/scripts/setenv-jogl.sh @@ -56,6 +56,25 @@ GLUEGEN_JAR=$GLUEGEN_BUILDDIR/gluegen-rt.jar GLUEGEN_OS=$GLUEGEN_BUILDDIR/obj JUNIT_JAR=$GLUEGEN_DIR/make/lib/junit.jar +joalpf=`find ../../joal -name joal.iml` +if [ -z "$joalpf" ] ; then + joalpf=`find .. -name joal.iml` +fi +if [ -z "$joalpf" ] ; then + echo JOAL_BUILDDIR not found + print_usage + exit +fi + +JOAL_DIR=`dirname $joalpf` +JOAL_BUILDDIR=$JOAL_DIR/$JOGL_BUILDDIR_BASE +if [ ! -e "$JOAL_BUILDDIR" ] ; then + echo JOAL_BUILDDIR $JOAL_BUILDDIR does not exist + print_usage + exit +fi +JOAL_JAR=$JOAL_BUILDDIR/joal.jar + if [ -z "$ANT_PATH" ] ; then ANT_PATH=$(dirname $(dirname $(which ant))) if [ -e $ANT_PATH/lib/ant.jar ] ; then @@ -71,6 +90,7 @@ fi ANT_JARS=$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar echo GLUEGEN BUILDDIR: $GLUEGEN_BUILDDIR +echo JOAL BUILDDIR: $JOAL_BUILDDIR echo JOGL DIR: $JOGL_DIR echo JOGL BUILDDIR: $JOGL_BUILDDIR echo JOGL BUILDDIR BASE: $JOGL_BUILDDIR_BASE @@ -84,12 +104,12 @@ CP_SEP=: LIB=$THISDIR/lib -JOGAMP_ALL_AWT_CLASSPATH=.:$GLUEGEN_JAR:$JOGL_ALL_AWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS -JOGAMP_ALL_NOAWT_CLASSPATH=.:$GLUEGEN_JAR:$JOGL_ALL_NOAWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS -JOGAMP_MOBILE_CLASSPATH=.:$GLUEGEN_JAR:$JOGL_MOBILE_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS +JOGAMP_ALL_AWT_CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_ALL_AWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS +JOGAMP_ALL_NOAWT_CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_ALL_NOAWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS +JOGAMP_MOBILE_CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_MOBILE_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS export JOGAMP_ALL_AWT_CLASSPATH JOGAMP_ALL_NOAWT_CLASSPATH JOGAMP_MOBILE_CLASSPATH -CLASSPATH=.:$GLUEGEN_JAR:$JOGL_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS +CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS export CLASSPATH # We use TempJarCache per default now! diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 8c3b16daa..33270edc6 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -288,8 +288,6 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NEWT $* #testawtswt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasSWT $* -#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $* -#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT $* @@ -304,6 +302,13 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestTeapotNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl3.newt.TestGeomShader01TextureGL3NEWT $* +# +# av demos +# +testnoawt jogamp.opengl.openal.av.ALDummyUsage $* +#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $* +#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple $* + # # core/newt (testnoawt and testawt) # @@ -440,7 +445,7 @@ function testawtswt() { #testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock01AWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT $* -testawt com.jogamp.opengl.test.bugs.Bug735Inv0AppletAWT $* +#testawt com.jogamp.opengl.test.bugs.Bug735Inv0AppletAWT $* #testawt com.jogamp.opengl.test.bugs.Bug735Inv1AppletAWT $* #testawt com.jogamp.opengl.test.bugs.Bug735Inv2AppletAWT $* #testawt com.jogamp.opengl.test.bugs.Bug735Inv3AppletAWT $* diff --git a/src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java b/src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java new file mode 100644 index 000000000..69223d0b9 --- /dev/null +++ b/src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java @@ -0,0 +1,19 @@ +package jogamp.opengl.openal.av; + +import jogamp.opengl.util.av.impl.FFMPEGMediaPlayer; + +import com.jogamp.openal.AL; +import com.jogamp.openal.JoalVersion; + +/** + * Demo JOAL usage w/ av dependency, i.e. FFMPEGMediaPlayer .. + */ +public class ALDummyUsage { + static AL al; + static FFMPEGMediaPlayer.PixelFormat pfmt; + + public static void main(String args[]) { + System.err.println("JOGL> Hello JOAL"); + System.err.println("JOAL: "+JoalVersion.getInstance().toString()); + } +} -- cgit v1.2.3