Date: Thu, 28 Jun 2012 19:28:17 GMT From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r814 - in branches/experimental/www/firefox-nightly: . files Message-ID: <201206281928.q5SJSH9S065886@trillian.chruetertee.ch>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Thu Jun 28 19:28:17 2012 New Revision: 814 Log: [debug] add alsa/pulse audio backend options Note, libcubeb can be disabled with media.use_cubeb in about:config Added: branches/experimental/www/firefox-nightly/files/patch-alsapulse branches/experimental/www/firefox-nightly/files/patch-bug685258 Modified: branches/experimental/www/firefox-nightly/Makefile Modified: branches/experimental/www/firefox-nightly/Makefile ============================================================================== --- branches/experimental/www/firefox-nightly/Makefile Tue Jun 26 16:20:11 2012 (r813) +++ branches/experimental/www/firefox-nightly/Makefile Thu Jun 28 19:28:17 2012 (r814) @@ -55,7 +55,11 @@ --disable-updater \ --disable-necko-wifi -OPTIONS_DEFAULT=DBUS GSTREAMER +OPTIONS_DEFAULT=DBUS GSTREAMER OSS + +OPTIONS_SINGLE+= AUDIO +OPTIONS_SINGLE_AUDIO= ALSA OSS PULSEAUDIO + OPTIONS_DEFINE= PGO PGO_DESC= Enable Profile-Guided Optimization @@ -89,6 +93,17 @@ MOZ_OPTIONS+= --disable-gnomeui .endif +.if ${PORT_OPTIONS:MALSA} +LIB_DEPENDS+= asound.2:${PORTSDIR}/audio/alsa-lib +RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins +MOZ_OPTIONS+= --enable-alsa +.endif + +.if ${PORT_OPTIONS:MPULSEAUDIO} +LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio +MOZ_OPTIONS+= --enable-pulseaudio +.endif + .if ${PORT_OPTIONS:MPGO} USE_DISPLAY= yes .include "${PORTSDIR}/Mk/bsd.python.mk" Added: branches/experimental/www/firefox-nightly/files/patch-alsapulse ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/experimental/www/firefox-nightly/files/patch-alsapulse Thu Jun 28 19:28:17 2012 (r814) @@ -0,0 +1,180 @@ +diff --git config/autoconf.mk.in config/autoconf.mk.in +index 44c0b06..748511b 100644 +--- config/autoconf.mk.in ++++ config/autoconf.mk.in +@@ -536,9 +536,14 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CFLAGS@ + MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@ + MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ + ++MOZ_ALSA = @MOZ_ALSA@ + MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@ + MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@ + ++MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@ ++MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@ ++MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@ ++ + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@ +diff --git config/system-headers config/system-headers +index 84b03b4..5f49f7a 100644 +--- config/system-headers ++++ config/system-headers +@@ -595,6 +595,7 @@ psap.h + Pt.h + pthread.h + pthread_np.h ++pulse/pulseaudio.h + pwd.h + Python.h + QDOffscreen.h +diff --git configure.in configure.in +index 5980b76..11f5f77 100644 +--- configure.in ++++ configure.in +@@ -5632,13 +5632,45 @@ dnl ======================================================== + dnl = Check alsa availability on Linux if using sydneyaudio + dnl ======================================================== + ++MOZ_ARG_ENABLE_BOOL(alsa, ++[ --enable-alsa Enable Alsa support], ++MOZ_ALSA=1, ++MOZ_ALSA=) ++ + dnl If using sydneyaudio with Linux, ensure that the alsa library is available + if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then ++ MOZ_ALSA=1 ++fi ++ ++if test -n "$MOZ_ALSA"; then + PKG_CHECK_MODULES(MOZ_ALSA, alsa, , + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) ++ AC_DEFINE(MOZ_CUBEB) + fi + ++AC_SUBST(MOZ_ALSA) ++ ++dnl ======================================================== ++dnl = Enable PulseAudio ++dnl ======================================================== ++ ++MOZ_ARG_ENABLE_BOOL(pulseaudio, ++[ --enable-pulseaudio Enable PulseAudio support], ++MOZ_PULSEAUDIO=1, ++MOZ_PULSEAUDIO=) ++ ++if test -n "$MOZ_PULSEAUDIO"; then ++ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , ++ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" ++ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])]) ++ AC_DEFINE(MOZ_CUBEB) ++fi ++ ++AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) ++AC_SUBST(MOZ_PULSEAUDIO_LIBS) ++AC_SUBST(MOZ_PULSEAUDIO) ++ + dnl ======================================================== + dnl = Enable GStreamer + dnl ======================================================== +diff --git media/libcubeb/src/Makefile.in media/libcubeb/src/Makefile.in +index 5ab4dd8..c8df26f 100644 +--- media/libcubeb/src/Makefile.in ++++ media/libcubeb/src/Makefile.in +@@ -24,10 +24,6 @@ endif + + ifeq ($(OS_TARGET),Android) + # No Android implementation of libcubeb yet. +-else ifeq ($(OS_TARGET),Linux) +-CSRCS = \ +- cubeb_alsa.c \ +- $(NULL) + endif + + ifeq ($(OS_TARGET),Darwin) +@@ -42,4 +38,16 @@ CSRCS = \ + $(NULL) + endif + ++ifdef MOZ_ALSA ++CSRCS = \ ++ cubeb_alsa.c \ ++ $(NULL) ++endif ++ ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ cubeb_pulse.c \ ++ $(NULL) ++endif ++ + include $(topsrcdir)/config/rules.mk +diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c +index 599aea2..41fd5af 100644 +--- media/libcubeb/src/cubeb_alsa.c ++++ media/libcubeb/src/cubeb_alsa.c +@@ -6,7 +6,9 @@ + */ + #undef NDEBUG + #define _BSD_SOURCE ++#ifndef __FreeBSD__ + #define _POSIX_SOURCE ++#endif + #include <pthread.h> + #include <sys/time.h> + #include <assert.h> +diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in +index 8dda8ce..b19641d 100644 +--- media/libsydneyaudio/src/Makefile.in ++++ media/libsydneyaudio/src/Makefile.in +@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android) + CSRCS = \ + sydney_audio_android.c \ + $(NULL) +-else ifeq ($(OS_ARCH),Linux) +-CSRCS = \ +- sydney_audio_alsa.c \ +- $(NULL) + endif + + ifeq ($(OS_ARCH),WINNT) +@@ -68,6 +64,18 @@ CSRCS = \ + $(NULL) + endif + ++ifdef MOZ_ALSA ++CSRCS = \ ++ sydney_audio_alsa.c \ ++ $(NULL) ++endif ++ ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif +diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in +index 43384e9..e46a6e3 100644 +--- toolkit/library/Makefile.in ++++ toolkit/library/Makefile.in +@@ -375,10 +375,12 @@ endif + + EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) + +-ifdef MOZ_SYDNEYAUDIO +-ifeq ($(OS_ARCH),Linux) ++ifdef MOZ_ALSA + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif ++ ++ifdef MOZ_PULSEAUDIO ++EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) + endif + + ifdef HAVE_CLOCK_MONOTONIC Added: branches/experimental/www/firefox-nightly/files/patch-bug685258 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/experimental/www/firefox-nightly/files/patch-bug685258 Thu Jun 28 19:28:17 2012 (r814) @@ -0,0 +1,17 @@ +# HG changeset patch +# User Oleg Romashin <romaxa@gmail.com> +# Parent a2291c212856ad27622416e83c8311b6a33b52f1 +Bug 685258 - Pulse audio backend does not check provided playback and crashes r=derf + +diff --git a/content/media/nsAudioStream.cpp b/content/media/nsAudioStream.cpp +--- content/media/nsAudioStream.cpp ++++ content/media/nsAudioStream.cpp +@@ -429,7 +429,7 @@ nsresult nsNativeAudioStream::Init(PRInt32 aNumChannels, PRInt32 aRate, SampleFo + mFormat = aFormat; + + if (sa_stream_create_pcm(reinterpret_cast<sa_stream_t**>(&mAudioHandle), +- NULL, ++ "Mozilla", + SA_MODE_WRONLY, + SA_PCM_FORMAT_S16_NE, + aRate,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206281928.q5SJSH9S065886>