FS#34116 - [qt5-multimedia] doesn't work without pulseaudio running

Attached to Project: Arch Linux
Opened by Tom (SeeLook) - Saturday, 02 March 2013, 18:40 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 16 February 2017, 18:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
Any application using this framework will depend on PulseAudio
When Pulse isn't running it hangs up on:
Unable to create a connection to the pulseaudio context

I think it is because Qt5 was built with -audio-backend flag and only one backend is available: pulseaudio.
To make qt5-multimedia directly depends on PulseAudio was unintentional I hope...
Fortunately any package depends on qt5-multimedia yet, but this fact won't bring popularity for this framework...

Additional info:
* package version
extra/qt5-multimedia 5.0.1-5 (qt)(s)


Steps to reproduce:
Just try to compile some Qt Multimedia (Audio input/output or audio devices) example and run.
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 16 February 2017, 18:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  alsa plugin is available in 5.8
Comment by Andrea Scarpino (BaSh) - Sunday, 03 March 2013, 01:16 GMT
Qt5 is already built with both ALSA and Pulse support. I also added OpenAL in the last rebuild.
Comment by Tom (SeeLook) - Sunday, 03 March 2013, 20:10 GMT
OpenAl responses "only" for audio 3D effects - it just processing audio data.
There are two low level classes: QAudioInput and QAudioOutput corresponding with devices through ALSA when Qt was complied without support for audio pulugins or through plugin(s). For this moment We have only one:
ls /usr/lib/qt/plugins/audio/
libqtmedia_pulse.so*

Just try this Qt example:
http://qt-project.org/doc/qt-5.0/qtmultimedia/multimedia-audiodevices.html
It doesn't work without PulseAudio installed
Comment by Andrea Scarpino (BaSh) - Thursday, 07 March 2013, 16:54 GMT
I see no packaging bug here as both alsa and pulseaudio are available when building Qt5, and the qt configure check explicitly says they are enabled.
Comment by Arno Rehn (pumphaus) - Friday, 16 May 2014, 01:28 GMT
  • Field changed: Percent Complete (100% → 0%)
This is actually still valid. After digging through the QMake project files, I found that if Pulse Audio is detected, the ALSA version is not even built (in fact, you can't build both backends together). See qtmultimedia/src/multimedia/audio/audio.pri for reference.

However, this means that the QtMultimedia package is effectively broken for anyone not using PulseAudio. My suggestion would be to provide an alternative package which has PulseAudio explicitly disabled and let the user choose which one to install.
Comment by Andrea Scarpino (BaSh) - Wednesday, 25 June 2014, 21:27 GMT
Status with 5.3.1?
Comment by Gu1 (Gu1) - Thursday, 26 June 2014, 03:12 GMT
I am affected by this issue too. In the meantime, I'm recompiling qt5 with the -no-pulseaudio flag.
Comment by Gu1 (Gu1) - Thursday, 10 July 2014, 23:25 GMT
Any update on this ? Should it be reported upstream ?
Comment by Arno Rehn (pumphaus) - Friday, 11 July 2014, 14:43 GMT
This is still relevant with 5.3.1. Not sure if this is qualifies as a Qt bug or not because it looks like it's supposed to work this way, even though it doesn't make a lot of sense on non-embedded systems.
Comment by Gu1 (Gu1) - Friday, 11 July 2014, 15:38 GMT
Seems like it will be fixed in Qt 5.4, which is planned to be released in october:
https://codereview.qt-project.org/#/c/87414/
https://bugreports.qt-project.org/browse/QTBUG-40190

Could the fix be backported to 5.3 if it's as simple as changing the plugins.pro to compile both ?
Comment by Arno Rehn (pumphaus) - Friday, 11 July 2014, 17:45 GMT
It might fix part of the problem, but not completely. See my comment on qt's codereview - there's more pulse specific stuff that's not part of a plugin.
Comment by Gu1 (Gu1) - Wednesday, 16 July 2014, 23:09 GMT
True, the QSoundEffect class may still be affected, but the QAudioOutput and QAudioInput class (and all the other Audio classes using them) should be fixed, right ?
I think it's still worth backporting as a temporary fix until Qt 5.4 comes out..
Comment by Arno Rehn (pumphaus) - Thursday, 17 July 2014, 17:04 GMT
Yes, I guess that would be the case. It's probably worth backporting then.
Comment by Gu1 (Gu1) - Sunday, 03 August 2014, 16:27 GMT
Bump. Any update on this ? Could the package maintainer backport these commits ?
Comment by Andrea Scarpino (BaSh) - Tuesday, 14 October 2014, 17:02 GMT
No, the patch hasn't been applied yet.
Comment by Arno Rehn (pumphaus) - Friday, 04 March 2016, 13:52 GMT
  • Field changed: Percent Complete (100% → 0%)
This is still a bug with qt5-multimedia-5.5.1-9 from the official repo. There's only the pulseaudio backend available. I see that that the upstream bug is closed, but it doesn't seem to be actually fixed (or it's a regression).
Comment by Arno Rehn (pumphaus) - Sunday, 06 March 2016, 16:42 GMT
It seems that Qt's 'configure' script does not automatically add the "alsa" QT_CONFIG option when PulseAudio is detected. This can be fixed by explicitly passing the "-alsa" option to 'configure'.
Since qtmultimedia.pro checks for the presence of 'alsa' in 'QT_CONFIG', this should implicitly fix this package on rebuild.

Loading...