GNOME Bugzilla – Bug 595029
pulse elements fail to connect to pulse 0.9.9
Last modified: 2009-10-17 07:01:18 UTC
The pulse elements in 0.10.16 fail after pa_stream_connect_playback/record() with "Invalid argument" when used with pulseaudio 0.9.9. I suggest we just bump the required version of the pa core.
Do you know why it breaks? And which version is the first that works again?
I only have 0.9.9 and .15 in gentoo and the only relevant change is the buf_attr changes.
If we are talking about that: memset (&buf_attr, 0, sizeof (buf_attr)); buf_attr.tlength = spec->segtotal * spec->segsize; buf_attr.maxlength = -1; buf_attr.prebuf = 0; buf_attr.minreq = -1; we were using values from the GstRingbuffer before and we could easily add an ifdef to do that again for older versions. If we certainly know that 0.9.9 is affected I would suggest to do memset (&buf_attr, 0, sizeof (buf_attr)); buf_attr.tlength = spec->segtotal * spec->segsize; buf_attr.prebuf = 0; #if HAVE_PULSE_0_9_10 buf_attr.maxlength = -1; buf_attr.minreq = -1; #else buf_attr.maxlength = buf_attr.tlength * 2; buf_attr.minreq = spec->segsize; #endif See commit b3c55f5ce5301d218596b199c893232802948a42
I just verfied that the first version understanding (uint32_t) -1 as values of pa_buffer_attr was 0.9.11.
Will everything continue to work on 0.9.9/0.9.10 if the -1 settings are not done anymore? Or does anything else depend on this?
We can either add my pseude patch (with HAVE_PULSE_0_9_10 changed to HAVE_PULSE_0_9_11) or bump the requiremnts to 0.9.11. As the patch is not very intrusive it would be fine to me to keep 0.9.9/0.9.10 supported. Should I makes the change?
The annoying thing about the ifdef approach is that its not a library-version requirement but a daemon-version requirement...
What would speak against just requiring 0.9.11 for the pulse plugin? That would also remove the need for many other #ifdefs everywhere...
Well if we can support an older version by using one if (there are checks against pulse-server-version already in the code), we could do it. But then using >=0.9.15 is recommended anyway. So I wouldn't mind bumping the requiremnt to that.
The only versions people should use of PA are 0.9.10 (before the glitch-free stuff), 0.9.15 (with glitch-free) 0.9.19 (current snapshot). So it probably makes sense to limit the PA versions we support to one of these. Here's a patch that bumps the minimum to 0.9.10. http://git.0pointer.de/?p=gst-plugins-good.git;a=patch;h=18db08720487c6a2300080d2a56bb774ea27e040 It's part of a series that also fixes bug 595231. You might merge the whole series at once.
Working on that as part of bug #595231.
commit abd7ec63cfc7212179144dbde575546c6b9502b5 Author: Lennart Poettering <lennart@poettering.net> Date: Fri Oct 16 17:26:41 2009 +0200 pulse: bump minimum libpulse version to 0.9.10 Older versions than 0.9.10 are really really old and buggy. Drop compatibility with them. Nobody should run anything that old. Also see: https://bugzilla.gnome.org/show_bug.cgi?id=595029