aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2023-09-26 14:15:50 +0000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-10-02 14:37:24 +0000
commit1ba070272eb3d93f21c92cef0dac74b7ea6d196d (patch)
tree2230b7b4cf208b2b724f122e8d87bea99443ba43
parentcc05190dfafa48e985d595b00bdf9f1a8ba14f0e (diff)
qtmultimedia: enable ffmpeg only if its license is accepted
QtMultimedia can use FFmpeg, but it has has somewhat problematic license and user must accept it before it can be built. Enable FFmpeg backend by default only if the license has been accepted in LICENSE_FLAGS_ACCEPTED. Pick-to: 6.5 Change-Id: If23ee18fa7ac7f92f58bf9d09d8e96aedd08b625 Reviewed-by: Inkamari Harjula <inkamari.harjula@qt.io> (cherry picked from commit 98eb819c18091345682ee34c60c2a7140ac9b5e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--README.md12
-rw-r--r--recipes-qt/qt6/qtmultimedia_git.bb5
2 files changed, 16 insertions, 1 deletions
diff --git a/README.md b/README.md
index a8c499c..cd87047 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,18 @@ QtWebEngine
QtWebEngine needs at least CMake 3.19, which is available starting from Hardknott.
For this reason QtWebEngine is not tested on older releases.
+QtMultimedia
+------------
+
+Qt Multimedia now prefers [FFmpeg][1] as the multimedia backend instead of GStreamer.
+FFmpeg recipe, however, is flagged with LICENSE_FLAGS = "commercial", which means
+that user must accept the license before FFmpeg can be used in the build. If user
+accepts the license using LICENSE_FLAGS_ACCEPTED = 'commercial_ffmpeg', the FFmpeg
+support is enabled in Qt Multimedia. If user doesn't accept the license,
+Qt Multimedia only uses GStreamer.
+
+[1]: https://doc.qt.io/qt-6/qtmultimedia-index.html#ffmpeg-as-the-default-backend
+
Contributing
------------
diff --git a/recipes-qt/qt6/qtmultimedia_git.bb b/recipes-qt/qt6/qtmultimedia_git.bb
index 55f069d..a2be688 100644
--- a/recipes-qt/qt6/qtmultimedia_git.bb
+++ b/recipes-qt/qt6/qtmultimedia_git.bb
@@ -20,7 +20,10 @@ include recipes-qt/qt6/qt6.inc
DEPENDS += "qtbase qtshadertools qtshadertools-native"
-PACKAGECONFIG ?= "ffmpeg gstreamer pulseaudio qml spatialaudio spatialaudio_quick3d"
+PACKAGECONFIG ?= "\
+ ${@bb.utils.contains_any('LICENSE_FLAGS_ACCEPTED','commercial commercial_ffmpeg','ffmpeg','',d)} \
+ gstreamer pulseaudio qml spatialaudio spatialaudio_quick3d"
+
PACKAGECONFIG[alsa] = "-DFEATURE_alsa=ON,-DFEATURE_alsa=OFF,alsa-lib"
PACKAGECONFIG[examples] = "-DQT_BUILD_EXAMPLES=ON,-DQT_BUILD_EXAMPLES=OFF,qtsvg"
PACKAGECONFIG[ffmpeg] = "-DFEATURE_ffmpeg=ON,-DFEATURE_ffmpeg=OFF,ffmpeg"