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.
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
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?
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.
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.
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
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
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.
Is this still relevant?
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".