Bug 208987 - devel/qt5 missing audio plugins
Summary: devel/qt5 missing audio plugins
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-22 23:36 UTC by nulluse
Modified: 2018-12-09 19:56 UTC (History)
5 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nulluse 2016-04-22 23:36:39 UTC
When running a Qt5 application with QT_DEBUG_PLUGINS=1 argument, it dumps the following diagnostics lines among others:

QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/qt5/plugins/audio" ... // there is no audio directory
QFactoryLoader::QFactoryLoader() checking directory path "/usr/home/user0/.kde4/lib/kde4/plugins/audio" ... // there is no .kde4/lib
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/kde4/plugins/audio" ... // also no audio directory

I was troubleshooting lack of sound output from the Qt program and made the comments (// etc) about the missing folders after the messages.

It looks like the audio plugins are missing from the port installation. The Qt team does not understand why all directories and their contents are missing.
Comment 1 Tobias Berner 2016-04-23 11:09:27 UTC
Hi

According to multimedia/qt5-multimedia/pkg-plist:

%%ALSA%%%%QT_PLUGINDIR%%/audio/libqtaudio_alsa.so
%%ALSA%%%%DEBUG%%%%QT_PLUGINDIR%%/audio/libqtaudio_alsa.so.debug
%%PULSEAUDIO%%%%QT_PLUGINDIR%%/audio/libqtmedia_pulse.so
%%PULSEAUDIO%%%%DEBUG%%%%QT_PLUGINDIR%%/audio/libqtmedia_pulse.so.debug

they should be installed if you select the correct options. 
* ALSA if you want to have the alsa-plugin
  and 
* PULSE for the pulse-plugin

Unfortunately neither is on by default.

Could you recompile multimedia/qt5-multimedia with the ALSA option set, and see if that works for you?


mfg Tobias
Comment 2 nulluse 2016-04-23 12:32:27 UTC
In this instance Qt5 was installed as a package, not port.
Sorry if I confused you by reporting this as a port bug!
Do I need to additionally install more packages to address this?
Comment 3 nulluse 2016-04-23 13:17:15 UTC
I tried installing the other packages but it seems that almost all of them are already installed, including qt5-multimedia, which I thought should fix the problem:

[root@leo00 ~]# pkg install qt5-multimedia qt5-opengl  qt5-phonon4 qt5-phonon4-gstreamer qt5-printsupport qt5-qdbus qt5-qdbusviewer  qt5-qev qt5-qtpaths qt5-sensors qt5-sql qt5-sqldrivers-mysql qt5-sqldrivers-odbc qt5-sqldrivers-sqlite3 qt5-uitools qt5-webkit qt5-websockets qt5-xml qt5-xmlpatterns qt5ct
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        qt5-phonon4: 4.8.3
        qt5-phonon4-gstreamer: 4.8.2
        qt5ct: 0.21

The process will require 2 MiB more space.
438 KiB to be downloaded.
Comment 4 Marie Loise Nolden 2016-04-23 13:24:28 UTC
You need to go to the port dir multimedia/qt5-multimedia and do a "make config" to get the screen for selecting the plugins (alsa/pulseaudio). Then do a "make" and "make install". Mind that you need to pin the installed port with pkg so it doesn't get overwritten by the next qt5-multimedia package when doing a pkg upgrade.
Comment 5 Tobias Berner 2016-04-23 13:26:11 UTC
Unfortunately you have to test it using the portstree.
You cannot "fix" this by installing more packages.

To give it a shot, you can
1) update your ports tree
2) cd /where/your/tree/is/multimedia/qt5-multimedia
3) make config
4) select "ALSA"
5) make deinstall install clean

This should give you a qt5-multimedia with alsaplugin:
   /usr/local/lib/qt5/plugins/audio/libqtaudio_alsa.so
Comment 6 nulluse 2016-04-23 13:46:30 UTC
That install the alsa lib but still getting no deivces in the diagnostic log from Qt and no sound:

 QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/qt5/plugins/audio" ...
 QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/qt5/plugins/audio/libqtaudio_alsa.so"
Found metadata in lib /usr/local/lib/qt5/plugins/audio/libqtaudio_alsa.so, metadata=
 {
"IID": "org.qt-project.qt.audiosystemfactory/5.0",
"MetaData": {
 "Keys": [
"alsa"
]
 },
 "className": "QAlsaPlugin",
 "debug": false,
"version": 328961
 }


Got keys from plugin meta data ("alsa")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/kde4/plugins/audio" ...
 loaded library "/usr/local/lib/qt5/plugins/audio/libqtaudio_alsa.so"
 Device count: 0
Device count: 0
Comment 7 Marie Loise Nolden 2016-05-29 12:14:09 UTC
That may be a related problem to

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208570

listing the default devices. We'll check for the fix and then notify for a retest.
Comment 8 Tobias C. Berner freebsd_committer freebsd_triage 2018-10-20 18:26:07 UTC
Is this still relevant?
Comment 9 Adriaan de Groot freebsd_committer freebsd_triage 2018-12-09 19:56:13 UTC
ALSA is the default now. I also had no trouble with sound in falkon. The `plugins/audio` directory exists, and contains an ALSA plugin.

Since there's no other explanation of what to test, I'm going to close this as "works for me".