[Rhythmbox-devel] [PATCH] Some works on configure.ac and Monkeys audio
- From: Jérémy Simon <jesimon libertysurf fr>
- To: rhythmbox-devel gnome org
- Subject: [Rhythmbox-devel] [PATCH] Some works on configure.ac and Monkeys audio
- Date: Wed, 31 Mar 2004 08:50:39 +0200
Hi,
I'm working on the gstreamer monkeysaudio. I wanted to test this
format with rhythmbox, so I made a patch ;). I'm not sure if rythmbox
should definitively provide a monkeysaudio playback :
_ the library is not free. But we had the permission from the author
to make a gstreamer plugin.
_ it's not fully compatible with big endian machine : it still needs
some love ...
What do you think ?
I have a sample file if you want to test :
http://apoc.homelinux.org/jere (DreameOn.ape). Note that you'll need the
last CVS version of gst-monkeysaudio : gstreamer cvs, gst-monkeysaudio
module.
I spent some times too on configure script trying to do some cleanups
and to add some gstreamer tests. The patch is attached ...
voila,
--
Jeremy Simon
--- configure.ac 2004-03-28 21:22:43.958375160 +0200
+++ configure.ac.new 2004-03-28 21:29:35.399826552 +0200
@@ -135,24 +135,12 @@
HAVE_SOUNDSYSTEM=no
GST_MAJORMINOR=0.8
- GST_REQUIRED_VERSION=0.7.6
+ GST_REQUIRED_VERSION=0.8.0
PKG_CHECK_MODULES(SOUNDSYSTEM, \
gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION gstreamer-libs-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION
gstreamer-control-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION gstreamer-gconf-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION,
HAVE_SOUNDSYSTEM=yes,HAVE_SOUNDSYSTEM=no)
-
- dnl try 0.7
- if test x"$HAVE_SOUNDSYSTEM" = xno; then
- AC_MSG_WARN([Couldn't find GStreamer 0.8, trying 0.7])
- GST_MAJORMINOR=0.7
- GST_REQUIRED_VERSION=0.7.4
- PKG_CHECK_MODULES(SOUNDSYSTEM, \
- gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION gstreamer-libs-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION
- gstreamer-control-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION gstreamer-gconf-$GST_MAJORMINOR >= $GST_REQUIRED_VERSION,
- HAVE_SOUNDSYSTEM=yes,HAVE_SOUNDSYSTEM=no)
- fi
-
dnl Give error and exit if we don't have gstreamer
if test "x$HAVE_SOUNDSYSTEM" = "xno"; then
AC_MSG_ERROR([GStreamer not found, or older than version $GST_REQUIRED_VERSION])
@@ -248,29 +236,33 @@
AC_ARG_ENABLE(mp3, AC_HELP_STRING([--disable-mp3],
[don't build with MP3 support]))
-if test x"$with_metadata" = xmonkeymedia; then
-if test "x$enable_mp3" != "xno"; then
- PKG_CHECK_MODULES(ID3TAG, id3tag >= 0.15.0b, enable_mp3=yes, enable_mp3=no)
- if test x"$enable_mp3" = xno; then
- AC_CHECK_HEADER(id3tag.h,[enable_mp3=yes],)
- if test x"$enable_mp3" = xyes; then
- AC_CHECK_LIB(id3tag,id3_frame_field,[enable_mp3=yes],[enable_mp3=no])
- if test x"$enable_mp3" = xno; then
+if test "x$with_metadata" = "xmonkeymedia"; then
+ if test "x$enable_mp3" != "xno"; then
+ PKG_CHECK_MODULES(ID3TAG, id3tag >= 0.15.0b, enable_mp3=yes, enable_mp3=no)
+ if test "x$enable_mp3" = "xno"; then
+ AC_CHECK_HEADER(id3tag.h,[enable_mp3=yes],)
+ if test "x$enable_mp3" = "xyes"; then
+ AC_CHECK_LIB(id3tag,id3_frame_field,[enable_mp3=yes],[enable_mp3=no])
+ if test "x$enable_mp3" = "xno"; then
AC_MSG_ERROR([For MP3 support, you need libid3tag 15.0b or later (or --disable-mp3)])
+ else
+ ID3TAG_LIBS="-lid3tag"
+ AC_SUBST(ID3TAG_LIBS)
fi
- ID3TAG_LIBS="-lid3tag"
+ fi
fi
fi
fi
-if test "x$enable_mp3" = "xyes"; then
- if test x"$have_gstreamer" = xyes; then
- AM_GST_ELEMENT_CHECK(mad,,missing_gst_elements="$missing_gst_elements mad")
+if test "x$have_gstreamer" = "xyes"; then
+ if test "x$enable_mp3" != "xno"; then
+ AM_GST_ELEMENT_CHECK(mad,enable_mp3="yes",missing_gst_elements="$missing_gst_elements mad" enable_mp3="no")
+ if test "x$enable_mp3" != "xno"; then
+ AM_GST_ELEMENT_CHECK(id3tag,enable_mp3="yes",missing_gst_elements="$missing_gst_elements mad" enable_mp3="no")
+ fi
fi
- AC_SUBST(ID3TAG_LIBS)
fi
if test "x$enable_mp3" = "xyes"; then
- AC_DEFINE(HAVE_MP3,,[Define if we have MP3 support])
-fi
+ AC_DEFINE(HAVE_MP3,,[Define if we have MP3 support])
fi
AM_CONDITIONAL(HAVE_MP3,test "x$enable_mp3" = "xyes")
@@ -278,14 +270,14 @@
AC_ARG_ENABLE(mp4, AC_HELP_STRING([--disable-mp4],
[don't build with MPEG-4 support]))
-if test x"$with_metadata" = xmonkeymedia; then
-if test "x$enable_mp4" != "xno"; then
- AC_CHECK_HEADER(mp4.h, [AC_CHECK_HEADER(mpeg4ip.h, [enable_mp4=yes],)],)
-fi
-if test "x$enable_mp4" = "xyes"; then
- LIBS="$LIBS -lmp4v2 -lstdc++"
- AC_DEFINE(HAVE_MP4,,[Define if we have MPEG-4 support])
-fi
+if test "x$with_metadata" = "xmonkeymedia"; then
+ if test "x$enable_mp4" != "xno"; then
+ AC_CHECK_HEADER(mp4.h, [AC_CHECK_HEADER(mpeg4ip.h, [enable_mp4=yes],)],)
+ fi
+ if test "x$enable_mp4" = "xyes"; then
+ LIBS="$LIBS -lmp4v2 -lstdc++"
+ AC_DEFINE(HAVE_MP4,,[Define if we have MPEG-4 support])
+ fi
fi
AM_CONDITIONAL(HAVE_MP4, test "x$enable_mp4" = "xyes")
@@ -293,23 +285,25 @@
AC_ARG_ENABLE(vorbis, AC_HELP_STRING([--disable-vorbis],
[don't build with Ogg Vorbis support]))
-if test x"$with_metadata" = xmonkeymedia; then
-if test x"$enable_vorbis" != xno; then
- MM_PATH_OGG(enable_vorbis=yes,enable_vorbis=no)
- if test x"$enable_vorbis" = xyes; then
- MM_PATH_VORBIS(,enable_vorbis=no)
- fi
- if test x"$enable_vorbis" = xyes; then
- if test x"$have_gstreamer" = xyes; then
- AM_GST_ELEMENT_CHECK(vorbisfile,,missing_gst_elements="$missing_gst_elements vorbis")
+if test "x$with_metadata" = "xmonkeymedia"; then
+ if test "x$enable_vorbis" != "xno"; then
+ MM_PATH_OGG(enable_vorbis=yes,enable_vorbis=no)
+ if test "x$enable_vorbis" = "xyes"; then
+ MM_PATH_VORBIS(,enable_vorbis=no)
+ fi
+ if test "x$enable_vorbis" = "xyes"; then
+ CFLAGS="$CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
+ LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS $VORBISFILE_LIBS"
fi
- CFLAGS="$CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
- LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS $VORBISFILE_LIBS"
+ fi
+fi
+if test "x$have_gstreamer" = "xyes"; then
+ if test "x$enable_vorbis" != "xno"; then
+ AM_GST_ELEMENT_CHECK(vorbisdec,enable_vorbis="yes",missing_gst_elements="$missing_gst_elements vorbis" enable_vorbis="no")
fi
-fi
-if test "x$enable_vorbis" = "xyes"; then
- AC_DEFINE(HAVE_VORBIS,,[Define if we have Ogg Vorbis support])
fi
+if test x"$enable_vorbis" = "xyes"; then
+ AC_DEFINE(HAVE_VORBIS,,[Define if we have Ogg Vorbis support])
fi
AM_CONDITIONAL(HAVE_VORBIS,test "x$enable_vorbis" = "xyes")
@@ -317,24 +311,35 @@
AC_ARG_ENABLE(flac, AC_HELP_STRING([--disable-flac],
[don't build with flac support]))
-if test x"$with_metadata" = xmonkeymedia; then
-if test x"$enable_flac" = xyes && test x"$enable_mp3" != xyes; then
- AC_MSG_ERROR([libid3tag is required for FLAC support])
+if test "x$with_metadata" = "xmonkeymedia"; then
+ if test "x$enable_flac" = "xyes" && test "x$enable_mp3" != "xyes"; then
+ AC_MSG_ERROR([libid3tag is required for FLAC support])
+ fi
+ if test "x$enable_flac" != "xno" && test "x$enable_mp3" = "xyes"; then
+ AC_CHECK_HEADER(FLAC/all.h,[enable_flac="yes"],)
+ fi
+ if test "x$enable_flac" = "xyes"; then
+ LIBS="$LIBS -lFLAC"
+ AC_DEFINE(HAVE_FLAC,,[Define if we have FLAC support])
+ fi
fi
-if test x"$enable_flac" != "xno" && test x"$enable_mp3" = xyes; then
- AC_CHECK_HEADER(FLAC/all.h,[enable_flac=yes],)
+if test "x$have_gstreamer" = "xyes"; then
+ if test "x$enable_flac" != "xno"; then
+ AM_GST_ELEMENT_CHECK(flac,enable_flac="yes",missing_gst_elements="$missing_gst_elements flac" enable_flac="no")
+ if test "x$enable_flac" != "xno"; then
+ AM_GST_ELEMENT_CHECK(flactag,enable_flac="yes",missing_gst_elements="$missing_gst_elements flactag" enable_flac="no")
+ fi
+ fi
fi
if test "x$enable_flac" = "xyes"; then
- LIBS="$LIBS -lFLAC"
+ AC_DEFINE(HAVE_FLAC,,[Define if we have FLAC support])
fi
-if test "x$enable_flac" = "xyes"; then
- AC_DEFINE(HAVE_FLAC,,[Define if we have FLAC support])
-fi
-fi
AM_CONDITIONAL(HAVE_FLAC,test "x$enable_flac" = "xyes")
-CFLAGS="$CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
-LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS $VORBISFILE_LIBS $FLAC_LIBS"
+if test "x$with_metadata" = "xmonkeymedia"; then
+ CFLAGS="$CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
+ LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS $VORBISFILE_LIBS $FLAC_LIBS"
+fi
AM_CONDITIONAL(USE_ID3VFS, test x"$enable_mp3" = "xyes" || test x"$enable_flac" = "xyes")
@@ -561,7 +566,6 @@
else
AC_MSG_NOTICE([** GStreamer metadata is enabled])
fi
-if test x"$with_metadata" = xmonkeymedia; then
if test x"$enable_mp3" != "xyes"; then
AC_MSG_NOTICE([ MP3 support is disabled])
else
@@ -582,7 +586,6 @@
else
AC_MSG_NOTICE([** MPEG-4 support is enabled])
fi
-fi
if test x"$enable_mmkeys" != "xyes"; then
AC_MSG_NOTICE([ Multimedia keys support is disabled])
else
--- configure.ac.new 2004-03-28 21:29:35.399826552 +0200
+++ configure.ac 2004-03-28 21:22:27.473881184 +0200
@@ -307,6 +307,22 @@
fi
AM_CONDITIONAL(HAVE_VORBIS,test "x$enable_vorbis" = "xyes")
+dnl Check for MonkeysAudio
+
+AC_ARG_ENABLE(monkeysaudio, AC_HELP_STRING([--enable-monkeysaudio],
+ [build with Monkeys Audio support]),enable_monkeysaudio="yes",enable_monkeysaudio="no")
+
+if test "x$enable_monkeysaudio" != "xno"; then
+ if test "x$with_metadata" != "xgstreamer" || test "x$with_player" != "xgstreamer"; then
+ AC_MSG_ERROR([Rhythmbox required GStreamer as backend (player and metadata) for Monkeys Audio support])
+ fi
+ AM_GST_ELEMENT_CHECK(monkeysdec,enable_monkeysaudio="yes",missing_gst_elements="$missing_gst_elements monkeysdec" enable_monkeysaudio="no")
+fi
+if test "x$enable_monkeysaudio" = "xyes"; then
+ AC_DEFINE(HAVE_MONKEYSAUDIO,,[Define if we have Monkeys Audio support])
+fi
+AM_CONDITIONAL(HAVE_MONKEYSAUDIO,test "x$enable_monkeysaudio" = "xyes")
+
dnl Check for FLAC
AC_ARG_ENABLE(flac, AC_HELP_STRING([--disable-flac],
@@ -576,6 +592,11 @@
else
AC_MSG_NOTICE([** Ogg Vorbis support is enabled])
fi
+if test x"$enable_monkeysaudio" != "xyes"; then
+ AC_MSG_NOTICE([ Monkeys Audio support is disabled])
+else
+ AC_MSG_NOTICE([** Monkeys Audio support is enabled])
+fi
if test x"$enable_flac" != "xyes"; then
AC_MSG_NOTICE([ FLAC support is disabled])
else
Index: metadata/rb-metadata-gst.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/metadata/rb-metadata-gst.c,v
retrieving revision 1.20
diff -u -r1.20 rb-metadata-gst.c
--- metadata/rb-metadata-gst.c 26 Mar 2004 15:45:40 -0000 1.20
+++ metadata/rb-metadata-gst.c 28 Mar 2004 20:16:25 -0000
@@ -54,8 +54,11 @@
const char *plugin;
} rb_metadata_type_map[] = {
{"application/x-id3", "id3tag"},
- {"application/ogg", NULL},
+ {"application/ogg", "vorbistag"},
{"audio/x-flac", "flactag"},
+#ifdef HAVE_MONKEYSAUDIO
+ {"application/x-ape", NULL}
+#endif
};
static GObjectClass *parent_class = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]