Commit 39d2ef51 authored by Philippe Normand's avatar Philippe Normand Committed by Sebastian Dröge

pulseutil: include pid value in gst_pulse_client_name() fallback return value

Fixes bug #627162
parent bc5345bb
......@@ -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
......
......@@ -26,6 +26,13 @@
#include "pulseutil.h"
#include <gst/audio/multichannel.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* getpid on UNIX */
#endif
#ifdef HAVE_PROCESS_H
# include <process.h> /* 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 *
......
......@@ -255,6 +255,9 @@
/* Define to enable OSX video (used by osxvideosink). */
#undef HAVE_OSX_VIDEO
/* Define to 1 if you have the <process.h> header file. */
#define HAVE_PROCESS_H 1
/* Define to enable pulseaudio plug-in (used by pulseaudio). */
#undef HAVE_PULSE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment