Details
-
Task
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
None
Description
As of Qt 5.5, QMediaPlayer contains a setVideoOutput() set of APIs (http://doc.qt.io/qt-5/qmediaplayer.html#setVideoOutput), but it does not provide a set of APIs to configure the output for audio streams.
This means usually the default audio sink is used and there's no easy way to change it when using QMediaPlayer. For instance, it's not possible to choose a non-default alsa or pulseaudio sink from inside the app.
My guess is there should be an API like:
void QMediaPlayer::setAudioOutput(QAudioDeviceInfo* outputInfo);
void QMediaPlayer::setAudioOutput(QAudioOutput* output);
Right now we are using a dirty and quick workaround we wrote in the qtgstreamer plugin. We use an environment variable to set the pulseaudio sink used by gstreamer, but of course the preferred way would be having a public API to pass that information down to gstreamer level. I attach the patch in case it's useful for somebody which wants to implement the gstreamer plugin part.