[vlc-commits] OSS: define HAVE_OSS, and disable on Linux by default
Rémi Denis-Courmont
git at videolan.org
Sun May 1 16:04:43 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 1 16:58:40 2011 +0300| [87ea4084d6056e39d96dbca24c233c11825031cd] | committer: Rémi Denis-Courmont
OSS: define HAVE_OSS, and disable on Linux by default
In many cases, OSS was used when the builder forgot to install the
alsa-lib development headers. This should not be an issue anymore, as
ALSA is now required on Linux by default.
I believe the fallback to OSS from ALSA and PulseAudio is causing more
confusion than it solves problem. Besides, the OSS emulation by ALSA
cannot mix, so OSS is almost completely useless on Linux, unless OSSv4
was specifically installed.
Moreover, Linux distributions have started dropping OSS completely.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87ea4084d6056e39d96dbca24c233c11825031cd
---
NEWS | 4 +++-
configure.ac | 39 +++++++++++++++++++++++----------------
modules/access/Modules.am | 8 +++++++-
modules/audio_output/Modules.am | 8 +++++++-
4 files changed, 40 insertions(+), 19 deletions(-)
diff --git a/NEWS b/NEWS
index 60f8a93..7a4ab5f 100644
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,9 @@ Important changes for packagers:
Non-UTF-8 file systems support will be removed in future versions.
* The VLC plugins path can be overriden with the VLC_PLUGIN_PATH environment
variable. The --plugin-path command line option was removed.
- * The default tarballs are now .tar.xz
+ * The default tarballs are now compressed with XZ/LZMA: .tar.xz
+ * OSS support is not compiled on Linux by default, pass --enable-oss to the
+ configure script if you use OSSv4 or really want to use OSS emulation.
* The NPAPI webplugin has moved to git://git.videolan.org/npapi-vlc.git
* The ActiveX webplugin has moved to git://git.videolan.org/activex-vlc.git
diff --git a/configure.ac b/configure.ac
index 7b4ec91..829a5df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3461,22 +3461,6 @@ dnl
EXTEND_HELP_STRING([Audio plugins:])
dnl
-dnl OSS /dev/dsp module (enabled by default except on win32)
-dnl
-AC_ARG_ENABLE(oss,
- [ --enable-oss Open Sound System OSS support (default enabled)])
-
-if test "${enable_oss}" != "no" &&
- (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
- test "${enable_oss}" = "yes")
-then
- AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
- VLC_ADD_PLUGIN([oss access_oss])
- AC_CHECK_LIB(ossaudio,main,[VLC_ADD_LIBS([oss access_oss],[-lossaudio])])
- ])
-fi
-
-dnl
dnl Pulseaudio module
dnl
AC_ARG_ENABLE(pulse,
@@ -3517,6 +3501,29 @@ AS_IF([test "${enable_alsa}" != "no"], [
AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
dnl
+dnl Open Sound System module
+dnl
+AC_ARG_ENABLE(oss,
+ [AS_HELP_STRING([--enable-oss],
+ [support the Open Sound System OSS (default enabled on BSD)])],, [
+ AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "mingwce" -o "$SYS" = "linux"], [
+ enable_oss="no"
+ ])
+])
+have_oss="no"
+OSS_LIBS=""
+AS_IF([test "$enable_oss" != "no"], [
+ AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
+ have_oss="yes"
+ AC_CHECK_LIB(ossaudio, main, [
+ OSS_LIBS="-lossaudio"
+ ])
+ ])
+])
+AC_SUBST(OSS_LIBS)
+AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
+
+dnl
dnl Portaudio module
dnl
PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
diff --git a/modules/access/Modules.am b/modules/access/Modules.am
index 8d7bdce..286288a 100644
--- a/modules/access/Modules.am
+++ b/modules/access/Modules.am
@@ -54,7 +54,6 @@ SOURCES_cdda = \
vcd/cdrom_internals.h \
$(NULL)
SOURCES_access_jack = jack.c
-SOURCES_access_oss = oss.c
SOURCES_access_mtp = mtp.c
SOURCES_access_sftp = sftp.c
SOURCES_access_imem = imem.c
@@ -93,6 +92,13 @@ libvlc_LTLIBRARIES += \
libaccess_vdr_plugin.la \
$(NULL)
+libaccess_oss_plugin_la = oss.c
+libaccess_oss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS)
+libaccess_oss_plugin_la_DEPENDENCIES =
+if HAVE_OSS
+libvlc_LTLIBRARIES += libaccess_oss_plugin.la
+endif
+
libaccess_alsa_plugin_la_SOURCES = alsa.c
libaccess_alsa_plugin_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
libaccess_alsa_plugin_la_LIBADD = $(AM_LIBADD) $(ALSA_LIBS)
diff --git a/modules/audio_output/Modules.am b/modules/audio_output/Modules.am
index 9c2804b..e9c0275 100644
--- a/modules/audio_output/Modules.am
+++ b/modules/audio_output/Modules.am
@@ -1,6 +1,5 @@
SOURCES_aout_directx = directx.c windows_audio_common.h
SOURCES_aout_file = file.c
-SOURCES_oss = oss.c
SOURCES_aout_sdl = sdl.c
SOURCES_waveout = waveout.c windows_audio_common.h
SOURCES_portaudio = portaudio.c
@@ -10,6 +9,13 @@ SOURCES_audioqueue = audioqueue.c
libvlc_LTLIBRARIES += libaout_file_plugin.la
+liboss_plugin_la = oss.c
+liboss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS)
+liboss_plugin_la_DEPENDENCIES =
+if HAVE_OSS
+libvlc_LTLIBRARIES += liboss_plugin.la
+endif
+
libalsa_plugin_la_SOURCES = alsa.c
libalsa_plugin_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
libalsa_plugin_la_LIBADD = $(AM_LIBADD) $(ALSA_LIBS)
More information about the vlc-commits
mailing list