[Spice-devel] [client 07/11] build-sys: Allow simultaneous support for Pulse and GStreamer audio

Christophe Fergeau cfergeau at redhat.com
Fri Nov 6 08:13:30 PST 2015


On Thu, Nov 05, 2015 at 12:17:19AM +0100, Francois Gouget wrote:
> On Wed, 4 Nov 2015, Christophe Fergeau wrote:
> 
> > Can you explain in the commit log why this is a good thing/why you need
> > to do that?
> 
> Not sure how to explain it in the commit log.
> 
> It's essentially like the video decoder support: we don't force the 
> developer to choose between the builtin MJPEG decoder and the GStreamer 
> decoder. You can compile both in and one can serve as the fallback for 
> the other. I see no reason why it would be different for the audio 
> backend.
> 
> Of course, ideally all such cases should be able to pick the backend 
> from the command line, a configuration file, and through the GUI. Also 
> the PulseAudio / GStreamer libraries should be loaded dynamically to not 
> force bringing in dependencies users may not care about. But I think 
> that's best left for later.

Ok, then this could be summarized as "Rather than GStreamer/PulseAudio
backend being mutually exclusive at compile-time, this commit allows to
enable both at the same time. PulseAudio will then be favoured, with a
fallback to GStreamer if it's not available."
One benefit to this approach is that this would kill the occasional
complaint we get that people using distro packages stop getting audio
when they disabled pulseaudio because they don't like it.

> Another reason for the change is that the SPICE_CHECK_GSTREAMER() 
> autoconf macro I introduce in the following patch defines 'HAVE_XXX' 
> macros instead of the WITH_PULSEAUDIO / WITH_GST macros that were used.
> 
> I also think having 'WITH_XXX' C macros is wrong as this essentially 
> means the C code to depends on whether autoconf takes a --with-xxx or 
> --enable-xxx option. Any optional features should depend on HAVE_XXX 
> macros regardless of whether that's from a regular compatibility check, 
> an --enable-xxx option or a --with-xxx one.


These are good points (and I'll actually try to remember this rule of
thumb as I never now what to pick between WITH/ENABLE/HAVE when naming
autoconf variables :), but I don't think fixing the issues you describe
require allowing to enable both GStreamer and PulseAudio at the same
time ;)

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151106/54eaee8b/attachment.sig>


More information about the Spice-devel mailing list