FS#48018 - [qt4] QtMultimedia not working with pulseaudio

Attached to Project: Arch Linux
Opened by ux (ubitux) - Wednesday, 03 February 2016, 17:28 GMT
Last edited by Jelle van der Waa (jelly) - Monday, 09 September 2019, 10:52 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 1
Private No

Details

QtMultimedia does not seem to be built with correct audio support.

☭ python -c 'from PySide.QtMultimedia import QAudioDeviceInfo;print(QAudioDeviceInfo.defaultOutputDevice().isNull())'
True

☭ python2 -c 'from PySide.QtMultimedia import QAudioDeviceInfo;print(QAudioDeviceInfo.defaultOutputDevice().isNull())'
True

Tried with the following:
phonon-qt4 4.8.3-5
phonon-qt4-gstreamer 4.8.2-4
phonon-qt4-vlc 0.8.2-4
phonon-qt5-gstreamer 4.8.2-4

Pulseaudio and its ALSA config are available.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Monday, 09 September 2019, 10:52 GMT
Reason for closing:  Deferred
Additional comments about closing:  Qt4 has been removed from the repos
Comment by ux (ubitux) - Thursday, 04 February 2016, 09:26 GMT
Apparently, this is specific to Qt4:

=== test.cpp ===
#include <QAudioDeviceInfo>
#include <QDebug>

int main(void) {
foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
qDebug() << "dev:" << deviceInfo.deviceName();
QAudioDeviceInfo def = QAudioDeviceInfo::defaultOutputDevice();
qDebug() << "default is null:" << def.isNull();
qDebug() << "default name:" << def.deviceName();
}

=== test.pro ===
TEMPLATE = app
CONFIG += debug
QT += multimedia
QT -= gui
SOURCES = test.cpp

===
% QT_SELECT=5 qmake && make clean && make test
rm -f test.o
rm -f *~ core *.core
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtMultimedia -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o test.o test.cpp
g++ -o test test.o -lQt5Multimedia -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread

% ./test
dev: "alsa_output.pci-0000_00_1b.0.analog-stereo"
dev: "alsa_output.pci-0000_00_03.0.hdmi-stereo"
default is null: false
default name: "alsa_output.pci-0000_00_1b.0.analog-stereo"

% QT_SELECT=4 qmake && make clean && make test
rm -f test.o
rm -f *~ core *.core
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_MULTIMEDIA_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtMultimedia -I/usr/include/qt4 -I. -o test.o test.cpp
g++ -Wl,-O1,--sort-common,--as-needed,-z,relro -o test test.o -L/usr/lib -lQtMultimedia -lQtCore -lpthread
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9][^0-9]*\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'test' && test -f test.gdb-index && objcopy --add-section '.gdb_index=test.gdb-index' --set-section-flags '.gdb_index=readonly' 'test' 'test' && rm -f test.gdb-index || true

% ./test
default is null: true
default name: ""

The following packages are installed:
phonon-qt4 4.8.3-5
phonon-qt4-gstreamer 4.8.2-4
phonon-qt4-vlc 0.8.2-4
phonon-qt5 4.8.3-5
phonon-qt5-gstreamer 4.8.2-4
phonon-qt5-vlc 0.8.2-4
pulseaudio 8.0-1
pulseaudio-alsa 2-3

Loading...