[vlc-commits] PulseAudio: support versions 0.9.16-0.9.21 with the Xlib hack
Rémi Denis-Courmont
git at videolan.org
Wed Aug 3 18:15:00 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 3 19:14:41 2011 +0300| [cbd0c5c4548010c9f5127a1ff6688289b76f1cd7] | committer: Rémi Denis-Courmont
PulseAudio: support versions 0.9.16-0.9.21 with the Xlib hack
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cbd0c5c4548010c9f5127a1ff6688289b76f1cd7
---
configure.ac | 16 ++++++++++++++--
modules/audio_output/pulse.c | 8 ++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index f1c6a4d..dd972f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3528,8 +3528,20 @@ AS_IF([test "${enable_pulse}" != "no"], [
PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.22], [
have_pulse="yes"
], [
- AS_IF([test "x${enable_pulse}" != "x"], [
- AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 0.9.22 or later required.])
+ PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.16], [
+ AS_IF([test "${no_x}" != "yes"], [
+ have_pulse="yes"
+ PULSE_LIBS="$PULSE_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11"
+ ], [
+ AS_IF([test "${enable_pulse}" = "yes"], [
+ AC_MSG_ERROR([Xlib is required with PulseAudio pre-0.9.22 versions
+(see http://www.pulseaudio.org/ticket/799 for further reference).])
+ ])
+ ])
+ ], [
+ AS_IF([test "x${enable_pulse}" != "x"], [
+ AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 0.9.22 or later required.])
+ ])
])
])
])
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 595fb54..ab4a4e0 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -32,6 +32,9 @@
#include <pulse/pulseaudio.h>
#include <vlc_pulse.h>
+#if !PA_CHECK_VERSION(0,9,22)
+# include <vlc_xlib.h>
+#endif
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
@@ -597,6 +600,11 @@ static int StreamMove(vlc_object_t *obj, const char *varname, vlc_value_t old,
*/
static int Open(vlc_object_t *obj)
{
+#if !PA_CHECK_VERSION(0,9,22)
+ if (!vlc_xlib_init(obj))
+ return VLC_EGENERIC;
+#endif
+
audio_output_t *aout = (audio_output_t *)obj;
pa_operation *op;
More information about the vlc-commits
mailing list