Merge pull request #271922 from puetzk/qt6-qtmultimedia-ffmpeg

qt6.qtmultimedia: Enable ffmpeg/VAAPI backend
This commit is contained in:
K900 2023-12-04 10:07:02 +03:00 committed by GitHub
commit f0b6f1fb27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -53,3 +53,5 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The `hardware.pulseaudio` module now sets permission of pulse user home directory to 755 when running in "systemWide" mode. It fixes [issue 114399](https://github.com/NixOS/nixpkgs/issues/114399).
- QtMultimedia has changed its default backend to `QT_MEDIA_BACKEND=ffmpeg` (previously `gstreamer` on Linux or `darwin` on MacOS).
The previous native backends remain available but are now minimally maintained. Refer to [upstream documentation](https://doc.qt.io/qt-6/qtmultimedia-index.html#ffmpeg-as-the-default-backend) for further details about each platform.

View File

@ -3,6 +3,7 @@
, stdenv
, qtbase
, qtdeclarative
, qtquick3d
, qtshadertools
, qtsvg
, pkg-config
@ -12,8 +13,11 @@
, gst-plugins-good
, gst-libav
, gst-vaapi
, ffmpeg_6
, libva
, libpulseaudio
, wayland
, libXrandr
, elfutils
, libunwind
, orc
@ -23,12 +27,14 @@
qtModule {
pname = "qtmultimedia";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libunwind orc ]
++ lib.optionals stdenv.isLinux [ libpulseaudio elfutils alsa-lib wayland ];
propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools ]
buildInputs = [ libunwind orc ffmpeg_6 ]
++ lib.optionals stdenv.isLinux [ libpulseaudio elfutils alsa-lib wayland libXrandr libva ];
propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools qtquick3d ]
++ lib.optionals stdenv.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
++ lib.optionals stdenv.isDarwin [ VideoToolbox ];
cmakeFlags = [ "-DENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS=0" ];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin
"-include AudioToolbox/AudioToolbox.h";
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin