From: Philippe Normand Date: Tue, 17 Aug 2010 14:26:41 +0000 (+0200) Subject: pulseutil: include pid value in gst_pulse_client_name() fallback return value X-Git-Tag: 1.19.3~509^2~8265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39d2ef5136a7c50458567a9be643bfcaaccfdff5;p=platform%2Fupstream%2Fgstreamer.git pulseutil: include pid value in gst_pulse_client_name() fallback return value Fixes bug #627162 --- diff --git a/configure.ac b/configure.ac index 68c334b..d338662 100644 --- a/configure.ac +++ b/configure.ac @@ -780,6 +780,10 @@ AG_GST_CHECK_FEATURE(LIBPNG, [Portable Network Graphics library], png, [ dnl *** pulseaudio *** translit(dnm, m, l) AM_CONDITIONAL(USE_PULSE, true) AG_GST_CHECK_FEATURE(PULSE, [pulseaudio plug-in], pulseaudio, [ + + dnl used in ext/pulse/pulseutil.c + AC_CHECK_HEADERS([process.h]) + AG_GST_PKG_CHECK_MODULES(PULSE, libpulse >= 0.9.10) AG_GST_PKG_CHECK_MODULES(PULSE_0_9_11, libpulse >= 0.9.11) if test x$HAVE_PULSE_0_9_11 = xyes; then diff --git a/ext/pulse/pulseutil.c b/ext/pulse/pulseutil.c index f28ba3c..2541459 100644 --- a/ext/pulse/pulseutil.c +++ b/ext/pulse/pulseutil.c @@ -26,6 +26,13 @@ #include "pulseutil.h" #include +#ifdef HAVE_UNISTD_H +# include /* getpid on UNIX */ +#endif +#ifdef HAVE_PROCESS_H +# include /* getpid on win32 */ +#endif + static const pa_channel_position_t gst_pos_to_pa[GST_AUDIO_CHANNEL_POSITION_NUM] = { [GST_AUDIO_CHANNEL_POSITION_FRONT_MONO] = PA_CHANNEL_POSITION_MONO, @@ -125,7 +132,7 @@ gst_pulse_client_name (void) else if (pa_get_binary_name (buf, sizeof (buf))) return g_strdup (buf); else - return g_strdup ("GStreamer"); + return g_strdup_printf ("GStreamer-pid-%lu", (gulong) getpid ()); } pa_channel_map * diff --git a/win32/common/config.h b/win32/common/config.h index 85cda65..ee06207 100644 --- a/win32/common/config.h +++ b/win32/common/config.h @@ -255,6 +255,9 @@ /* Define to enable OSX video (used by osxvideosink). */ #undef HAVE_OSX_VIDEO +/* Define to 1 if you have the header file. */ +#define HAVE_PROCESS_H 1 + /* Define to enable pulseaudio plug-in (used by pulseaudio). */ #undef HAVE_PULSE