Hello!

This patch does not contains code, only configuration setups, and it is
not meant to be committed. I need some feedback on that because I'm not
a configure expert so it is highly probable that I've missed something.

I'll commit this with the fist piece of real code (the audio file
reader/writers only actually, maybe a basic mixer) in a couple of days
(I'm still cleaning up things), of course if I don't get negative
feedback.

Thanks for the input!
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Jabber: [EMAIL PROTECTED] - Profile: 
http://www.gtalkprofile.com/profile/9661.html
pgp key: http://subkeys.pgp.net/
PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: lib/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.135
diff -u -r1.135 Makefile.am
--- lib/Makefile.am	8 May 2007 01:09:30 -0000	1.135
+++ lib/Makefile.am	30 May 2007 13:31:46 -0000
@@ -12,7 +12,7 @@
 JCOMPILER = $(ECJ) -1.5 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
 else
 if FOUND_JAVAC
-JCOMPILER = $(JAVAC) -bootclasspath '' -classpath $(compile_classpath) -d . @classes
+JCOMPILER = $(JAVAC) -source 1.5 -target 1.5 -bootclasspath '' -classpath $(compile_classpath) -d . @classes
 #else
 #if FOUND_GCJ
 ## This should never be used when gcj is the compiler.
Index: native/jni/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/native/jni/Makefile.am,v
retrieving revision 1.18
diff -u -r1.18 Makefile.am
--- native/jni/Makefile.am	21 Aug 2006 23:34:45 -0000	1.18
+++ native/jni/Makefile.am	30 May 2007 13:31:46 -0000
@@ -24,15 +24,19 @@
   CLASSPATH_GCONF_PEER_DIR = gconf-peer
 endif
 
+if CREATE_GSTREAMER_PEER_LIBRARIES
+  CLASSPATH_GSTREAMER_PEER_DIR = gstreamer-peer
+endif
+
 if CREATE_XMLJ_LIBRARY
   XMLJDIR = xmlj
 endif
 
 SUBDIRS = classpath $(JNIDIRS) \
   $(ALSADIR) $(DSSIDIR) $(GTKDIR) $(CLASSPATH_QT_PEER_DIR) $(XMLJDIR) \
-  $(CLASSPATH_GCONF_PEER_DIR)
+  $(CLASSPATH_GCONF_PEER_DIR) $(CLASSPATH_GSTREAMER_PEER_DIR)
 DIST_SUBDIRS = classpath java-io java-lang java-net java-nio java-util \
-               gtk-peer gconf-peer qt-peer xmlj midi-alsa midi-dssi \
+               gtk-peer gconf-peer gstreamer-peer qt-peer xmlj midi-alsa midi-dssi \
                native-lib
 
 all-local:
Index: configure.ac
===================================================================
RCS file: /sources/classpath/classpath/configure.ac,v
retrieving revision 1.209
diff -u -r1.209 configure.ac
--- configure.ac	13 May 2007 23:00:56 -0000	1.209
+++ configure.ac	30 May 2007 13:31:45 -0000
@@ -112,11 +112,29 @@
 AM_CONDITIONAL(CREATE_GCONF_PEER_LIBRARIES, test "x${COMPILE_GCONF_PEER}" = xyes)
 
 dnl -----------------------------------------------------------
-dnl GTK native peer error checking
+dnl GConf native peer error checking
 dnl -----------------------------------------------------------
 AC_ARG_ENABLE([gconf-peers],,AC_MSG_ERROR([No --enable-gconf-peers (or --disable-gconf-peers) option; you want --enable-gconf-peer]))
 
 dnl ------------------------------------------------------------
+dnl GStreamer based sound provider backend (disabled by default)
+dnl ------------------------------------------------------------
+AC_ARG_ENABLE([gstreamer-peer],
+              [AS_HELP_STRING(--enable-gstreamer-peer,compile GStreamer native peers (disabled by --disable-jni) [default=no])],
+              [case "${enableval}" in
+                yes) COMPILE_GSTREAMER_PEER=yes ;;
+                no) COMPILE_GSTREAMER_PEER=no ;;
+                *) COMPILE_GSTREAMER_PEER=default ;;
+              esac],
+              [COMPILE_GSTREAMER_PEER=default])
+AM_CONDITIONAL(CREATE_GSTREAMER_PEER_LIBRARIES, test "x${COMPILE_GSTREAMER_PEER}" = xyes)
+
+dnl -----------------------------------------------------------
+dnl GStreamer native peer error checking
+dnl -----------------------------------------------------------
+AC_ARG_ENABLE([gstreamer-peers],,AC_MSG_ERROR([No --enable-gstreamer-peers (or --disable-gstreamer-peers) option; you want --enable-gstreamer-peer]))
+
+dnl ------------------------------------------------------------
 dnl Whether to compile with -Werror or not (disabled by default)
 dnl ------------------------------------------------------------
 AC_ARG_ENABLE([Werror],
@@ -519,6 +537,47 @@
     fi
   fi
 
+  dnl gstreamer-peer
+  if  test "x${COMPILE_GSTREAMER_PEER}" = xyes; then
+    dnl FIXME: this is pretty hight requirement, maybe it can be lowered
+    dnl moreover, we really need all these? 
+    GST_MAJORMINOR=0.10
+    GST_REQUIRED=0.10.10
+
+    dnl gstreamer
+    PKG_CHECK_MODULES(GSTREAMER, gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED)
+    AC_SUBST(GSTREAMER_CFLAGS)
+    AC_SUBST(GSTREAMER_LIBS)
+
+    dnl gstreamer-base
+    PKG_CHECK_MODULES(GSTREAMER_BASE,
+                      gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED)
+    AC_SUBST(GSTREAMER_BASE_CFLAGS)
+    AC_SUBST(GSTREAMER_BASE_LIBS)
+
+    dnl gstreamer-plugin-base
+    PKG_CHECK_MODULES(GSTREAMER_PLUGINS_BASE,
+                      gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQUIRED)
+    AC_SUBST(GSTREAMER_PLUGINS_BASE_CFLAGS)
+    AC_SUBST(GSTREAMER_PLUGINS_BASE_LIBS)
+
+    dnl we also need gdk for locking?
+    dnl PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.8)
+    dnl AC_SUBST(GDK_CFLAGS)
+    dnl AC_SUBST(GDK_LIBS)
+
+	dnl -fno-strict-aliasing -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*
+	GST_PLUGIN_LDFLAGS='-module -avoid-version -Wno-unused-parameter -no-undefined'
+	AC_SUBST(GST_PLUGIN_LDFLAGS)
+	
+	dnl set the gstreamer based file reader, writer and mixer
+	GSTREAMER_FILE_READER=gnu.javax.sound.sampled.gstreamer.io.GstAudioFileReader
+	GSTREAMER_MIXER_PROVIDER=gnu.javax.sound.sampled.gstreamer.GStreamerMixerProvider
+  fi
+  dnl add the gstreamer resources 
+  AC_SUBST(GSTREAMER_FILE_READER)
+  AC_SUBST(GSTREAMER_MIXER_PROVIDER)
+
   dnl Check for AWT related Qt4
   if test "x${COMPILE_QT_PEER}" = xyes; then
     PKG_CHECK_MODULES(QT, QtCore QtGui >= 4.1.0, HAVE_QT4="yes", HAVE_QT4="no")
@@ -890,6 +949,7 @@
 native/jni/java-util/Makefile
 native/jni/gtk-peer/Makefile
 native/jni/gconf-peer/Makefile
+native/jni/gstreamer-peer/Makefile
 native/jni/qt-peer/Makefile
 native/jni/xmlj/Makefile
 native/jni/midi-alsa/Makefile
@@ -898,6 +958,8 @@
 native/plugin/Makefile
 resource/Makefile
 resource/META-INF/services/java.util.prefs.PreferencesFactory
+resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader
+resource/META-INF/services/javax.sound.sampled.spi.MixerProvider
 scripts/Makefile
 scripts/classpath.spec
 lib/Makefile
Index: include/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/include/Makefile.am,v
retrieving revision 1.81
diff -u -r1.81 Makefile.am
--- include/Makefile.am	18 Apr 2007 15:52:54 -0000	1.81
+++ include/Makefile.am	30 May 2007 13:31:46 -0000
@@ -14,6 +14,9 @@
 $(top_srcdir)/include/gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.h \
 $(top_srcdir)/include/gnu_javax_sound_midi_dssi_DSSISynthesizer.h
 
+GST_PEER_H_FILES = \
+$(top_srcdir)/include/gnu_javax_sound_sampled_gstreamer_io_GstAudioFileReaderNativePeer.h
+
 XMLJ_H_FILES = \
 $(top_srcdir)/include/gnu_xml_libxmlj_dom_GnomeDocument.h \
 $(top_srcdir)/include/gnu_xml_libxmlj_dom_GnomeXPathNodeList.h \
@@ -117,6 +120,7 @@
 
 H_FILES = \
 $(SOUND_H_FILES) \
+$(GST_PEER_H_FILES) \
 $(XMLJ_H_FILES) \
 $(GTKPEER_H_FILES) \
 $(QTPEER_H_FILES) \
@@ -348,6 +352,8 @@
 	$(JAVAH) -o $@ gnu.javax.sound.midi.dssi.DSSISynthesizer
 $(top_srcdir)/include/gnu_java_util_prefs_gconf_GConfNativePeer.h: $(top_srcdir)/gnu/java/util/prefs/gconf/GConfNativePeer.java
 	$(JAVAH) -o $@ gnu.java.util.prefs.gconf.GConfNativePeer
+$(top_srcdir)/include/gnu_javax_sound_sampled_gstreamer_io_GstAudioFileReaderNativePeer.h: $(top_builddir)/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java
+	$(JAVAH) -o $@ gnu.javax.sound.sampled.gstreamer.io.GstAudioFileReaderNativePeer
 $(top_srcdir)/include/gnu_java_net_VMPlainSocketImpl.h: $(top_srcdir)/vm/reference/gnu/java/net/VMPlainSocketImpl.java
 	$(JAVAH) -o $@ gnu.java.net.VMPlainSocketImpl
 $(top_srcdir)/include/gnu_java_net_local_LocalSocketImpl.h: $(top_srcdir)/gnu/java/net/local/LocalSocketImpl.java
Index: native/jni/gstreamer-peer/Makefile.am
===================================================================
RCS file: native/jni/gstreamer-peer/Makefile.am
diff -N native/jni/gstreamer-peer/Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ native/jni/gstreamer-peer/Makefile.am	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,22 @@
+nativeexeclib_LTLIBRARIES = libgstreamerpeer.la
+
+libgstreamerpeer_la_SOURCES = GStreamerIOPeer.c \
+                              gstinputstream.c \
+														  gstclasspathsrc.c \
+                              gstclasspathsrc.h \
+                              gstinputstream.h
+
+libgstreamerpeer_la_LIBADD = $(top_builddir)/native/jni/classpath/jcl.lo
+
+libgstreamerpeer_la_LDFLAGS = $(AM_LDFLAGS) @GST_PLUGIN_LDFLAGS@ -avoid-version
+
+AM_LDFLAGS = @CLASSPATH_MODULE@ @GSTREAMER_LIBS@ @GSTREAMER_BASE_LIBS@ \
+             @GSTREAMER_PLUGINS_BASE_LIBS@ @GDK_LIBS@
+
+AM_CPPFLAGS = @CLASSPATH_INCLUDES@
+
+# We cannot use -Wwrite-strings and the strict flags since
+# gstreamer contain broken prototypes (by design).
+AM_CFLAGS = @WARNING_CFLAGS@ -Wno-write-strings -Wno-missing-field-initializers \
+            @ERROR_CFLAGS@ -Wno-unused-parameter @GSTREAMER_BASE_CFLAGS@ \
+            @GDK_CFLAGS@ @GSTREAMER_CFLAGS@ @GSTREAMER_PLUGINS_BASE_CFLAGS@ 
Index: resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader.in
===================================================================
RCS file: resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader.in
diff -N resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader.in	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,3 @@
[EMAIL PROTECTED]@
+gnu.javax.sound.sampled.WAV.WAVReader
+gnu.javax.sound.sampled.AU.AUReader
Index: resource/META-INF/services/javax.sound.sampled.spi.MixerProvider.in
===================================================================
RCS file: resource/META-INF/services/javax.sound.sampled.spi.MixerProvider.in
diff -N resource/META-INF/services/javax.sound.sampled.spi.MixerProvider.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ resource/META-INF/services/javax.sound.sampled.spi.MixerProvider.in	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,1 @@
[EMAIL PROTECTED]@

Reply via email to