Bug 268876 - multimedia/qt6-multimedia: enable PulseAudio support
Summary: multimedia/qt6-multimedia: enable PulseAudio support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: crash, needs-patch
Depends on:
Blocks:
 
Reported: 2023-01-11 01:47 UTC by Jan Beich
Modified: 2023-02-23 10:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2023-01-11 01:47:28 UTC
Currently, no audio backends are enabled

  Low level Audio Backend:
    ALSA (experimental) .................. no
    PulseAudio ........................... no
    MMRenderer ........................... no
    CoreAudio ............................ no
    Windows Media SDK .................... no
    Open SLES (Android) .................. no
    Web Assembly ......................... no

which leads to crashes as documented in emulators/rpcs3/pkg-message.qt6

  Default output selection is broken in qt6-multimedia. To workaround RPCS3 crash
  on game start open Settings -> Audio -> Music Handler then change Qt to Null.

  Process 84361 stopped
  * thread #1, name = 'rpcs3', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
      frame #0: 0x0000000805112583 libQt6Multimedia.so.6`QMediaDevices::audioOutputs() at qmediadevices.cpp:133:47
     130  */
     131  QList<QAudioDevice> QMediaDevices::audioOutputs()
     132  {
  -> 133      return QPlatformMediaDevices::instance()->audioOutputs();
     134  }
     135
     136  /*!
  (lldb) bt
  * thread #1, name = 'rpcs3', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    * frame #0: 0x0000000805112583 libQt6Multimedia.so.6`QMediaDevices::audioOutputs() at qmediadevices.cpp:133:47
      frame #1: 0x000000080511274e libQt6Multimedia.so.6`QMediaDevices::defaultAudioOutput() at qmediadevices.cpp:190:26
      frame #2: 0x00000008050c86ef libQt6Multimedia.so.6`QAudioOutput::QAudioOutput(this=0x0000000899ff05e0, parent=0x0000000000000000) at qaudiooutput.cpp:54:20
  [...]
Comment 1 Jan Beich freebsd_committer freebsd_triage 2023-02-10 16:10:10 UTC
Ping. I can add an unconditional dependency i.e., don't know how to disable pulseaudio support if the dependency is already installed.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-02-23 10:20:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8453bb8045763566a33792d9b4ea3d8dbbec4426

commit 8453bb8045763566a33792d9b4ea3d8dbbec4426
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-02-23 07:00:32 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-02-23 10:19:32 +0000

    multimedia/qt6-multimedia: respect upstream defaults

    Expose auto-detected dependencies as options to make builds deterministic.
    Disabling all audio backends is forbidden to avoid crashes as upstream
    doesn't test a configuration that cannot happen on Android, macOS, Windows,
    QNX or desktop Linux (except Gentoo).

    PR:             268876
    Approved by:    portmgr blanket, maintainer timeout (partially: no patch but no help)

 emulators/rpcs3/Makefile                           |  2 +-
 emulators/rpcs3/pkg-message.qt6 (gone)             | 25 ----------
 multimedia/qt6-multimedia/Makefile                 | 47 ++++++++++++++++--
 .../patch-src_multimedia_configure.cmake (new)     | 11 +++++
 ...lugins_multimedia_ffmpeg_qv4l2camera__p.h (new) | 11 +++++
 multimedia/qt6-multimedia/pkg-plist                | 57 +++++++++++++++++++---
 6 files changed, 116 insertions(+), 37 deletions(-)
Comment 3 Jan Beich freebsd_committer freebsd_triage 2023-02-23 10:28:50 UTC
"portmgr blanket" was used for the crash fix + disable auto-detection while "maintainer timeout" was used to respect "batteries included" policy + keep consistency with the old behavior or what can be configured outside of ports.