Skip to contentSkip to conversation

package/qt6: add qt6 multimedia

PATCH Superseded baxiche su 2 participants 3 messages Sep 16, 2024 – Sep 19, 2024

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

baxiche su

author
#0 lore raw

PATCH v2 1/1 package/qt6: add qt6 multimedia

---
 DEVELOPERS                                   |  3 +
 package/qt6/Config.in                        |  1 +
 package/qt6/qt6multimedia/Config.in          | 17 +++++
 package/qt6/qt6multimedia/qt6multimedia.hash | 13 ++++
 package/qt6/qt6multimedia/qt6multimedia.mk   | 80 ++++++++++++++++++++
 5 files changed, 114 insertions(+)
 create mode 100644 package/qt6/qt6multimedia/Config.in
 create mode 100644 package/qt6/qt6multimedia/qt6multimedia.hash
 create mode 100644 package/qt6/qt6multimedia/qt6multimedia.mk
DEVELOPERS +3 -0
index 929e9f895f..56209f9970 100644
@@ -343,6 +343,9 @@ F:	package/tcpdump/
 F:	package/ti-uim/
 F:	package/uhubctl/
 
+N:	Baxiche Su <[email protected]>
+F:	package/qt6/qt6multimedia
+
 N:	Ben Boeckel <[email protected]>
 F:	package/taskd/
 
package/qt6/Config.in +1 -0
index 4cbb60322c..debf4f4733 100644
@@ -48,6 +48,7 @@ source "package/qt6/qt6core5compat/Config.in"
 source "package/qt6/qt6declarative/Config.in"
 source "package/qt6/qt6languageserver/Config.in"
 source "package/qt6/qt6mqtt/Config.in"
+source "package/qt6/qt6multimedia/Config.in"
 source "package/qt6/qt6opcua/Config.in"
 source "package/qt6/qt6scxml/Config.in"
 source "package/qt6/qt6serialbus/Config.in"
package/qt6/qt6multimedia/Config.in new file +17 -0
new file mode 100644
index 0000000000..77ff3d28ae
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_QT6MULTIMEDIA
+	bool "qt6multimedia"
+	select BR2_PACKAGE_QT6BASE_GUI
+	select BR2_PACKAGE_QT6BASE_NETWORK
+	select BR2_PACKAGE_QT6BASE_CONCURRENT
+	select BR2_PACKAGE_QT6SHADERTOOLS
+
+	help
+    	  Qt Multimedia is an add-on module that provides 
+  	  a rich set of QML types and C++ classes to handle 
+  	  multimedia content. It contains an easy to use API 
+  	  for playing back audio and video files and rendering 
+  	  those on screen, as well as a comprehensive API for 
+  	  recording audio and video from the system's cameras 
+  	  and microphones.
+
+	  https://doc.qt.io/qt-6/qtmultimedia-index.html
package/qt6/qt6multimedia/qt6multimedia.hash new file +13 -0
new file mode 100644
index 0000000000..855699fa2d
@@ -0,0 +1,13 @@
+# Hash from: https://download.qt.io/official_releases/qt/6.7/6.7.2/submodules/qtmultimedia-everywhere-src-6.7.2.tar.xz.sha256
+sha256  8ef835115acb9a1d3d2c9f23cfacb43f2c537e3786a8ab822299a2a7765651d3  qtmultimedia-everywhere-src-6.7.2.tar.xz
+
+# Hashes for license files:
+sha256  9f0490f18656c6f2435bd14f603ef0c96434d1825615363dce43abb42ed1dcce  LICENSES/BSD-3-Clause.txt
+sha256  3abd6471b9a9a08d65ce771143f8e278bb4c1aeb10c1c2d476935a6b049653f5  LICENSES/BSL-1.0.txt
+sha256  110535522396708cea37c72a802c5e7e81391139f5f7985631c93ef242b206a4  LICENSES/GFDL-1.3-no-invariants-only.txt
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSES/GPL-2.0-only.txt
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSES/GPL-3.0-only.txt
+sha256  da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768  LICENSES/LGPL-3.0-only.txt
+sha256  d040359701c01996a017d5c515678929cd1b0625e64cb86db44025fbb6cdf1fc  LICENSES/MIT.txt
+sha256  9b1f50aae6267f9d5e0ceb6775ee86450262c25ec7c0573e151fe5d3f18a4700  LICENSES/LicenseRef-Qt-Commercial.txt
+sha256  40678d338ce53cd93f8b22b281a2ecbcaa3ee65ce60b25ffb0c462b0530846b2  LICENSES/Qt-GPL-exception-1.0.txt
package/qt6/qt6multimedia/qt6multimedia.mk new file +80 -0

80 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi baxiche su, Hi Thomas,

Please do some sanity control on my feedback, Thomas.

man. 16. sep. 2024 kl. 09:30 skrev baxiche su <[email protected]>:

Quoted 46 lines
---
 DEVELOPERS                                   |  3 +
 package/qt6/Config.in                        |  1 +
 package/qt6/qt6multimedia/Config.in          | 17 +++++
 package/qt6/qt6multimedia/qt6multimedia.hash | 13 ++++
 package/qt6/qt6multimedia/qt6multimedia.mk   | 80 ++++++++++++++++++++
 5 files changed, 114 insertions(+)
 create mode 100644 package/qt6/qt6multimedia/Config.in
 create mode 100644 package/qt6/qt6multimedia/qt6multimedia.hash
 create mode 100644 package/qt6/qt6multimedia/qt6multimedia.mk
DEVELOPERS +3 -0
index 929e9f895f..56209f9970 100644
@@ -343,6 +343,9 @@ F:  package/tcpdump/
 F:     package/ti-uim/
 F:     package/uhubctl/
 
+N:     Baxiche Su <[email protected]>
+F:     package/qt6/qt6multimedia
+
 N:     Ben Boeckel <[email protected]>
 F:     package/taskd/
 
package/qt6/Config.in +1 -0
index 4cbb60322c..debf4f4733 100644
@@ -48,6 +48,7 @@ source "package/qt6/qt6core5compat/Config.in"
 source "package/qt6/qt6declarative/Config.in"
 source "package/qt6/qt6languageserver/Config.in"
 source "package/qt6/qt6mqtt/Config.in"
+source "package/qt6/qt6multimedia/Config.in"
 source "package/qt6/qt6opcua/Config.in"
 source "package/qt6/qt6scxml/Config.in"
 source "package/qt6/qt6serialbus/Config.in"
package/qt6/qt6multimedia/Config.in new file +0 -0
new file mode 100644
index 0000000000..77ff3d28ae

package/qt6/qt6multimedia/Config.in line 5

Quoted 5 lines
package/qt6/qt6multimedia/Config.in new file +5 -0
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_QT6MULTIMEDIA
+       bool "qt6multimedia"
+       select BR2_PACKAGE_QT6BASE_GUI
+       select BR2_PACKAGE_QT6BASE_NETWORK
+       select BR2_PACKAGE_QT6BASE_CONCURRENT

I don't see information in the buildsystem saying the Qt Concurrent Module is required. It would be nice with an explaination here.

package/qt6/qt6multimedia/Config.in line 15

Quoted 11 lines
package/qt6/qt6multimedia/Config.in new file +10 -0
+       select BR2_PACKAGE_QT6SHADERTOOLS
+
+       help
+         Qt Multimedia is an add-on module that provides
+         a rich set of QML types and C++ classes to handle
+         multimedia content. It contains an easy to use API
+         for playing back audio and video files and rendering
+         those on screen, as well as a comprehensive API for
+         recording audio and video from the system's cameras
+         and microphones.

+

package/qt6/qt6multimedia/Config.in line 17

Quoted 2 lines
package/qt6/qt6multimedia/Config.in new file +1 -0
+         https://doc.qt.io/qt-6/qtmultimedia-index.html

I think we should mention all the modules in the Qt Multimedia project here:

It contains the following modules:

Qt Multimedia:
https://doc.qt.io/qt-6/qtmultimedia-index.html

Qt Multimedia Widgets:
https://doc.qt.io/qt-6/qtmultimediawidgets-index.html

Qt Spatial Audio:
https://doc.qt.io/qt-6/qtspatialaudio-index.html

I also think you should add a flag to disable/enable the Qt Spatial Audio Module since this is not determined automatically:

if BR2_PACKAGE_QT6MULTIMEDIA

config BR2_PACKAGE_QT6MULTIMEDIA_SPATIALAUDIO
bool "spatial audio"

endif

Quoted 25 lines
package/qt6/qt6multimedia/qt6multimedia.hash new file +1 -0
new file mode 100644
index 0000000000..855699fa2d
@@ -0,0 +1,13 @@
+# Hash from:

https://download.qt.io/official_releases/qt/6.7/6.7.2/submodules/qtmultimedia-everywhere-src-6.7.2.tar.xz.sha256
+sha256
<https://download.qt.io/official_releases/qt/6.7/6.7.2/submodules/qtmultimedia-everywhere-src-6.7.2.tar.xz.sha256+sha256>
8ef835115acb9a1d3d2c9f23cfacb43f2c537e3786a8ab822299a2a7765651d3 qtmultimedia-everywhere-src-6.7.2.tar.xz

package/qt6/qt6multimedia/qt6multimedia.hash new file +3 -0
+
+# Hashes for license files:
+sha256  9f0490f18656c6f2435bd14f603ef0c96434d1825615363dce43abb42ed1dcce

LICENSES/BSD-3-Clause.txt
+sha256 3abd6471b9a9a08d65ce771143f8e278bb4c1aeb10c1c2d476935a6b049653f5 LICENSES/BSL-1.0.txt
+sha256 110535522396708cea37c72a802c5e7e81391139f5f7985631c93ef242b206a4 LICENSES/GFDL-1.3-no-invariants-only.txt
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSES/GPL-2.0-only.txt
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSES/GPL-3.0-only.txt

Quoted 9 lines

+sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 LICENSES/LGPL-3.0-only.txt
+sha256 d040359701c01996a017d5c515678929cd1b0625e64cb86db44025fbb6cdf1fc LICENSES/MIT.txt
+sha256 9b1f50aae6267f9d5e0ceb6775ee86450262c25ec7c0573e151fe5d3f18a4700 LICENSES/LicenseRef-Qt-Commercial.txt
+sha256 40678d338ce53cd93f8b22b281a2ecbcaa3ee65ce60b25ffb0c462b0530846b2 LICENSES/Qt-GPL-exception-1.0.txt

This is my autogenerated list:

# Hashes for license files
sha256 f32fb3b417a194167cfad068223fc975ba96c5960513a10f66a3c28720aec1df
LICENSES/BSD-2-Clause.txt
sha256 9f0490f18656c6f2435bd14f603ef0c96434d1825615363dce43abb42ed1dcce
LICENSES/BSD-3-Clause.txt
sha256 1f1b677d26ab73e159a55c3a914cf12d888e18a9d0d469fedab4aa6e5a48b1c0
LICENSES/BSD-Source-Code.txt
sha256 84c6ef3ea9e3254a54d0acf5d3e0c61ae011b8fef7dd6940591cf060e6380a8f
LICENSES/BSL-1.0.txt
sha256 110535522396708cea37c72a802c5e7e81391139f5f7985631c93ef242b206a4
LICENSES/GFDL-1.3-no-invariants-only.txt
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
LICENSES/GPL-2.0-only.txt
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903
LICENSES/GPL-3.0-only.txt
sha256 7658542977bfdced9e1059a6c934ce4281de76d103b831007b825917dc62511a
LICENSES/IJG.txt
sha256 f2ec607f67bb0dd3053b49835b02110d5cd0f8eb6da3aac4dc0b142a6b299be9
LICENSES/ISC.txt
sha256 fa6f36630bb1e0c571d34b2bbdf188d08495c9dbf58f28cac112f303fc1f58fb
LICENSES/LGPL-2.1-or-later.txt
sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768
LICENSES/LGPL-3.0-only.txt
sha256 b85dcd3e453d05982552c52b5fc9e0bdd6d23c6f8e844b984a88af32570b0cc0
LICENSES/MIT.txt
sha256 66a3107d5ad6a058aab753eaac2047ccb2ed0e39465dd0fe5844da3e300d5172
LICENSES/MPL-2.0.txt
sha256 40678d338ce53cd93f8b22b281a2ecbcaa3ee65ce60b25ffb0c462b0530846b2
LICENSES/Qt-GPL-exception-1.0.txt
sha256 bfb1112d49db5b1daecdfef24bd7e2f3ea0bafb33aa67aa0ab51e2bf8407c03d
LICENSES/Zlib.txt
sha256 85da7c29c2d2f2e6b3116b1219584cb513474cab797b3312a779be4c2181e51e
src/3rdparty/eigen/COPYING.BSD
sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85
src/3rdparty/eigen/COPYING.MPL2
sha256 8b69cf3ac3ddd34df478c4ae6eaacf5e6c63ea7ee6403c8dad97e4d1438bc3c4
src/3rdparty/eigen/COPYRIGHTS
sha256 b522f821df94da3bad917e98ef04817b3af421c3b8c23e8247ae7e517b289934
src/3rdparty/pffft/COPYRIGHTS
sha256 a46200592eb193853527250da098e6bb0c75424e7a2c7db8da526c4f301c3d88
src/3rdparty/pffft/LICENSE
sha256 2513c5ad87ce9e7feed2c9a159d336f0a0d12ff93adcd411f7a15a1ab678f7ac
src/3rdparty/resonance-audio/COPYRIGHTS
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30
src/3rdparty/resonance-audio/LICENSE

Quoted 20 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +9 -0
new file mode 100644
index 0000000000..ed405fe7d0
@@ -0,0 +1,80 @@
 
+################################################################################
+#
+# qt6multimedia
+#
 
+################################################################################
+
+QT6MULTIMEDIA_VERSION = $(QT6_VERSION)
+QT6MULTIMEDIA_SITE = $(QT6_SITE)
+QT6MULTIMEDIA_SOURCE =

qtmultimedia-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6MULTIMEDIA_VERSION).tar.xz

package/qt6/qt6multimedia/qt6multimedia.mk

Quoted 2 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +2 -0
+QT6MULTIMEDIA_INSTALL_STAGING = YES
+

Maybe remove the spacing between the one-liners at the top of the file?

Quoted 4 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +3 -0
+QT6MULTIMEDIA_SUPPORTS_IN_SOURCE_BUILD = NO
+
+QT6MULTIMEDIA_CMAKE_BACKEND = ninja

package/qt6/qt6multimedia/qt6multimedia.mk line 24

Quoted 10 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +10 -0
+
+QT6MULTIMEDIA_LICENSE = \
+       BSD-3-Clause (docs, examples), \
+       BSL-1.0, \
+       GFDL-1.3 no invariants (docs), \
+       LGPL-2.1+, \
+       LGPL-3.0 or GPL-2.0 or GPL-3.0, \
+       MIT \
+       MPL-2.0
+

As a reference, the following is more complete license information for whats available in the repo:

QT6MULTIMEDIA_LICENSE = \
Apache-2.0 (resonance-audio), \
BSD-3-Clause (buildsystem, examples, pfft, snippets), \
BSL-1.0 (ffmpeg-boost), \
GFDL-1.3-no-invariants (docs), \
GPL-3.0 (tests), \
GPL-3.0 with Qt-GPL-exception-1.0 (utils), \
IJG (ffmpeg-libjpeg), \
LGPL-2.1+ and BSD-3-Clause and BSD-2-Clause and BSD-Source-Code and ISC and MIT and MPL-2.0 (ffmpeg), \
LGPL-3.0 or GPL-2.0 or GPL-3.0 (modules, plugins), \
LGPL-3.0 or GPL-3.0 (resonance-audio, spatialaudio, spatialaudioquick3d), \
MPL-2.0 and BSD-3-Clause (eigen), \
Zlib (ffmpeg-zlib)

But this should depend on what is actually installed on the image.

+QT6MULTIMEDIA_LICENSE_FILES = \

Quoted 8 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +7 -0
+    LICENSES/BSD-2-Clause.txt \
+    LICENSES/BSD-3-Clause.txt \
+    LICENSES/BSD-Source-Code.txt \
+    LICENSES/BSL-1.0.txt \
+    LICENSES/GFDL-1.3-no-invariants-only.txt \
+    LICENSES/GPL-2.0-only.txt \
+    LICENSES/GPL-3.0-only.txt \

package/qt6/qt6multimedia/qt6multimedia.mk line 42

Quoted 10 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +10 -0
+    LICENSES/IJG.txt \
+    LICENSES/ISC.txt \
+    LICENSES/LGPL-2.1-or-later.txt \
+    LICENSES/LGPL-3.0-only.txt \
+    LICENSES/LicenseRef-Qt-Commercial.txt \
+    LICENSES/MIT.txt \
+    LICENSES/MPL-2.0.txt \
+    LICENSES/Qt-GPL-exception-1.0.txt \
+    LICENSES/Zlib.txt
+

This is my autogenerated list:

QT6MULTIMEDIA_LICENSE_FILES = \
LICENSES/BSD-2-Clause.txt \
LICENSES/BSD-3-Clause.txt \
LICENSES/BSD-Source-Code.txt \
LICENSES/BSL-1.0.txt \
LICENSES/GFDL-1.3-no-invariants-only.txt \
LICENSES/GPL-2.0-only.txt \
LICENSES/GPL-3.0-only.txt \
LICENSES/IJG.txt \
LICENSES/ISC.txt \
LICENSES/LGPL-2.1-or-later.txt \
LICENSES/LGPL-3.0-only.txt \
LICENSES/MIT.txt \
LICENSES/MPL-2.0.txt \
LICENSES/Qt-GPL-exception-1.0.txt \
LICENSES/Zlib.txt \
src/3rdparty/eigen/COPYING.BSD \
src/3rdparty/eigen/COPYING.MPL2 \
src/3rdparty/eigen/COPYRIGHTS \
src/3rdparty/pffft/COPYRIGHTS \
src/3rdparty/pffft/LICENSE \
src/3rdparty/resonance-audio/COPYRIGHTS \
src/3rdparty/resonance-audio/LICENSE

This variable should probably also depend on what is actually installed on target.

package/qt6/qt6multimedia/qt6multimedia.mk line 49

Quoted 8 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +7 -0
+QT6MULTIMEDIA_CONF_OPTS = \
+       -DBUILD_WITH_PCH=OFF \
+       -DQT_BUILD_EXAMPLES=OFF \
+       -DQT_BUILD_TESTS=OFF
+       -DQT_HOST_PATH=$(HOST_DIR) \
+
+QT6MULTIMEDIA_DEPENDENCIES = \

I think you should add linux as a dependency here for v4l and dmabuf config test.

See ./src/multimedia/configure.cmake

package/qt6/qt6multimedia/qt6multimedia.mk line 59

Quoted 11 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +10 -0
+       qt6base \
+       qt6shadertools
+
+# Qt6 multimedia can build without the following packages.
+# The configuration process automatically detects the
+# libraries if present
+
+ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
+QT6MULTIMEDIA_DEPENDENCIES += alsa-lib
+endif

I think this is also needed according to ./src/multimedia/configure.cmake:

ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
QT6MULTIMEDIA_DEPENDENCIES += libegl
endif

package/qt6/qt6multimedia/qt6multimedia.mk line 64

Quoted 6 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +5 -0
+
+ifeq ($(BR2_PACKAGE_GSTREAMER1),y)
+QT6MULTIMEDIA_DEPENDENCIES += gstreamer1
+endif
+

See ./src/multimedia/configure.cmake:
...
qt_feature("gstreamer_1_0" PRIVATE
LABEL "GStreamer 1.0"
CONDITION GStreamer_FOUND
)
qt_feature("gstreamer_app" PRIVATE
LABEL "GStreamer App"
CONDITION ( QT_FEATURE_gstreamer_1_0 AND GStreamer_App_FOUND )
)
qt_feature("gstreamer_photography" PRIVATE
LABEL "GStreamer Photography"
CONDITION ( QT_FEATURE_gstreamer_1_0 AND GStreamer_Photography_FOUND )
)
qt_feature("gstreamer_gl" PRIVATE
LABEL "GStreamer OpenGL"
CONDITION QT_FEATURE_opengl AND QT_FEATURE_gstreamer_1_0 AND
GStreamer_Gl_FOUND AND EGL_FOUND
)
qt_feature("gstreamer" PRIVATE
LABEL "QtMM GStreamer plugin"
CONDITION (QT_FEATURE_gstreamer_1_0 AND QT_FEATURE_gstreamer_app) ENABLE INPUT_gstreamer STREQUAL 'yes'
DISABLE INPUT_gstreamer STREQUAL 'no'
)
...

I think the following looks more correct:

ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP),yy) QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_gstreamer=ON QT6MULTIMEDIA_DEPENDENCIES += \
gstreamer1 \
gst1-plugins-base
else
QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_gstreamer=OFF
endif

And if available maybe do the same for gstreamer_photography and gstreamer_gl?

package/qt6/qt6multimedia/qt6multimedia.mk line 68

Quoted 5 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +4 -0
+ifeq ($(BR2_PACKAGE_LIBVA),y)
+QT6MULTIMEDIA_DEPENDENCIES += libva
+endif
+

See ./src/multimedia/configure.cmake:
...
qt_feature("linux_v4l" PRIVATE
LABEL "Video for Linux"
CONDITION UNIX AND TEST_linux_v4l
)
qt_feature("linux_dmabuf" PRIVATE
LABEL "Linux DMA buffer support"
CONDITION UNIX AND TEST_linux_dmabuf
)
qt_feature("vaapi" PRIVATE
LABEL "VAAPI support"
CONDITION UNIX AND VAAPI_FOUND AND QT_FEATURE_linux_dmabuf
)

This is why I think you need to add the linux dependency as mentioned before.

package/qt6/qt6multimedia/qt6multimedia.mk line 79

Quoted 12 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +11 -0
+ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
+QT6MULTIMEDIA_DEPENDENCIES += pulseaudio
+ifeq ($(BR2_PACKAGE_FFMPEG),y)
+QT6MULTIMEDIA_DEPENDENCIES += ffmpeg
+endif
+endif
+
+ifeq ($(BR2_PACKAGE_QT6DECLARATIVE),y)
+QT6MULTIMEDIA_DEPENDENCIES += qt6declarative
+endif
+

I think you should also add:

ifeq ($(BR2_PACKAGE_QT6MULTIMEDIA_SPATIALAUDIO),y) QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_spatialaudio=ON else
QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_spatialaudio=OFF endif

And maybe we could add this now even though quick3d is not added yet?:

ifeq ($(BR2_PACKAGE_QT6QUICK3D),y)
QT6MULTIMEDIA_DEPENDENCIES += qt6quick3d
endif

Quoted 5 lines

+$(eval $(cmake-package))
--
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

author
#2 lore raw

Hi Roy,

I apologize for committing an incomplete feature.

I'm working on resolving it and have two questions regarding qt6-multimedia:

1. Should linux be added to qt6-multimedia dependencies? The v4l support only requires the linux/videodev2.h header from linux-header.

2. The qt6-multimedia documentation recommends FFmpeg 6.1.1, while the Buildroot project uses 6.1.2. Given potential future
upgrades,
should we compile a separate FFmpeg library specifically for
qt6-multimedia,
or use the Buildroot project's FFmpeg version?

Thanks for reviewing my work.

Your guidance on these matters would be greatly appreciated.

baxiche

Roy Kollen Svendsen <[email protected]> 於 2024年9月16日 週一 下午4:45寫道:

Quoted 439 lines

Hi baxiche su, Hi Thomas,

Please do some sanity control on my feedback, Thomas.

man. 16. sep. 2024 kl. 09:30 skrev baxiche su <[email protected]>:

Quoted 46 lines
---
 DEVELOPERS                                   |  3 +
 package/qt6/Config.in                        |  1 +
 package/qt6/qt6multimedia/Config.in          | 17 +++++
 package/qt6/qt6multimedia/qt6multimedia.hash | 13 ++++
 package/qt6/qt6multimedia/qt6multimedia.mk   | 80 ++++++++++++++++++++
 5 files changed, 114 insertions(+)
 create mode 100644 package/qt6/qt6multimedia/Config.in
 create mode 100644 package/qt6/qt6multimedia/qt6multimedia.hash
 create mode 100644 package/qt6/qt6multimedia/qt6multimedia.mk
DEVELOPERS +3 -0
index 929e9f895f..56209f9970 100644
@@ -343,6 +343,9 @@ F:  package/tcpdump/
 F:     package/ti-uim/
 F:     package/uhubctl/
 
+N:     Baxiche Su <[email protected]>
+F:     package/qt6/qt6multimedia
+
 N:     Ben Boeckel <[email protected]>
 F:     package/taskd/
 
package/qt6/Config.in +1 -0
index 4cbb60322c..debf4f4733 100644
@@ -48,6 +48,7 @@ source "package/qt6/qt6core5compat/Config.in"
 source "package/qt6/qt6declarative/Config.in"
 source "package/qt6/qt6languageserver/Config.in"
 source "package/qt6/qt6mqtt/Config.in"
+source "package/qt6/qt6multimedia/Config.in"
 source "package/qt6/qt6opcua/Config.in"
 source "package/qt6/qt6scxml/Config.in"
 source "package/qt6/qt6serialbus/Config.in"
package/qt6/qt6multimedia/Config.in new file +0 -0
new file mode 100644
index 0000000000..77ff3d28ae

package/qt6/qt6multimedia/Config.in line 5

Quoted 5 lines
package/qt6/qt6multimedia/Config.in new file +5 -0
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_QT6MULTIMEDIA
+       bool "qt6multimedia"
+       select BR2_PACKAGE_QT6BASE_GUI
+       select BR2_PACKAGE_QT6BASE_NETWORK
+       select BR2_PACKAGE_QT6BASE_CONCURRENT

I don't see information in the buildsystem saying the Qt Concurrent Module is required. It would be nice with an explaination here.

package/qt6/qt6multimedia/Config.in line 15

Quoted 11 lines
package/qt6/qt6multimedia/Config.in new file +10 -0
+       select BR2_PACKAGE_QT6SHADERTOOLS
+
+       help
+         Qt Multimedia is an add-on module that provides
+         a rich set of QML types and C++ classes to handle
+         multimedia content. It contains an easy to use API
+         for playing back audio and video files and rendering
+         those on screen, as well as a comprehensive API for
+         recording audio and video from the system's cameras
+         and microphones.

+

package/qt6/qt6multimedia/Config.in line 17

Quoted 2 lines
package/qt6/qt6multimedia/Config.in new file +1 -0
+         https://doc.qt.io/qt-6/qtmultimedia-index.html

I think we should mention all the modules in the Qt Multimedia project here:

It contains the following modules:

Qt Multimedia:
https://doc.qt.io/qt-6/qtmultimedia-index.html

Qt Multimedia Widgets:
https://doc.qt.io/qt-6/qtmultimediawidgets-index.html

Qt Spatial Audio:
https://doc.qt.io/qt-6/qtspatialaudio-index.html

I also think you should add a flag to disable/enable the Qt Spatial Audio Module since this is not determined automatically:

if BR2_PACKAGE_QT6MULTIMEDIA

config BR2_PACKAGE_QT6MULTIMEDIA_SPATIALAUDIO
bool "spatial audio"

endif

Quoted 34 lines
package/qt6/qt6multimedia/qt6multimedia.hash new file +1 -0
new file mode 100644
index 0000000000..855699fa2d
@@ -0,0 +1,13 @@
+# Hash from:

https://download.qt.io/official_releases/qt/6.7/6.7.2/submodules/qtmultimedia-everywhere-src-6.7.2.tar.xz.sha256
+sha256
<https://download.qt.io/official_releases/qt/6.7/6.7.2/submodules/qtmultimedia-everywhere-src-6.7.2.tar.xz.sha256+sha256>
8ef835115acb9a1d3d2c9f23cfacb43f2c537e3786a8ab822299a2a7765651d3 qtmultimedia-everywhere-src-6.7.2.tar.xz

package/qt6/qt6multimedia/qt6multimedia.hash new file +3 -0
+
+# Hashes for license files:
+sha256

9f0490f18656c6f2435bd14f603ef0c96434d1825615363dce43abb42ed1dcce LICENSES/BSD-3-Clause.txt
+sha256 3abd6471b9a9a08d65ce771143f8e278bb4c1aeb10c1c2d476935a6b049653f5 LICENSES/BSL-1.0.txt
+sha256 110535522396708cea37c72a802c5e7e81391139f5f7985631c93ef242b206a4 LICENSES/GFDL-1.3-no-invariants-only.txt
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSES/GPL-2.0-only.txt
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSES/GPL-3.0-only.txt
+sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 LICENSES/LGPL-3.0-only.txt
+sha256

Quoted 9 lines

d040359701c01996a017d5c515678929cd1b0625e64cb86db44025fbb6cdf1fc LICENSES/MIT.txt
+sha256 9b1f50aae6267f9d5e0ceb6775ee86450262c25ec7c0573e151fe5d3f18a4700 LICENSES/LicenseRef-Qt-Commercial.txt
+sha256 40678d338ce53cd93f8b22b281a2ecbcaa3ee65ce60b25ffb0c462b0530846b2 LICENSES/Qt-GPL-exception-1.0.txt

This is my autogenerated list:

# Hashes for license files
sha256 f32fb3b417a194167cfad068223fc975ba96c5960513a10f66a3c28720aec1df
LICENSES/BSD-2-Clause.txt
sha256 9f0490f18656c6f2435bd14f603ef0c96434d1825615363dce43abb42ed1dcce
LICENSES/BSD-3-Clause.txt
sha256 1f1b677d26ab73e159a55c3a914cf12d888e18a9d0d469fedab4aa6e5a48b1c0
LICENSES/BSD-Source-Code.txt
sha256 84c6ef3ea9e3254a54d0acf5d3e0c61ae011b8fef7dd6940591cf060e6380a8f
LICENSES/BSL-1.0.txt
sha256 110535522396708cea37c72a802c5e7e81391139f5f7985631c93ef242b206a4
LICENSES/GFDL-1.3-no-invariants-only.txt
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
LICENSES/GPL-2.0-only.txt
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903
LICENSES/GPL-3.0-only.txt
sha256 7658542977bfdced9e1059a6c934ce4281de76d103b831007b825917dc62511a
LICENSES/IJG.txt
sha256 f2ec607f67bb0dd3053b49835b02110d5cd0f8eb6da3aac4dc0b142a6b299be9
LICENSES/ISC.txt
sha256 fa6f36630bb1e0c571d34b2bbdf188d08495c9dbf58f28cac112f303fc1f58fb
LICENSES/LGPL-2.1-or-later.txt
sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768
LICENSES/LGPL-3.0-only.txt
sha256 b85dcd3e453d05982552c52b5fc9e0bdd6d23c6f8e844b984a88af32570b0cc0
LICENSES/MIT.txt
sha256 66a3107d5ad6a058aab753eaac2047ccb2ed0e39465dd0fe5844da3e300d5172
LICENSES/MPL-2.0.txt
sha256 40678d338ce53cd93f8b22b281a2ecbcaa3ee65ce60b25ffb0c462b0530846b2
LICENSES/Qt-GPL-exception-1.0.txt
sha256 bfb1112d49db5b1daecdfef24bd7e2f3ea0bafb33aa67aa0ab51e2bf8407c03d
LICENSES/Zlib.txt
sha256 85da7c29c2d2f2e6b3116b1219584cb513474cab797b3312a779be4c2181e51e
src/3rdparty/eigen/COPYING.BSD
sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85
src/3rdparty/eigen/COPYING.MPL2
sha256 8b69cf3ac3ddd34df478c4ae6eaacf5e6c63ea7ee6403c8dad97e4d1438bc3c4
src/3rdparty/eigen/COPYRIGHTS
sha256 b522f821df94da3bad917e98ef04817b3af421c3b8c23e8247ae7e517b289934
src/3rdparty/pffft/COPYRIGHTS
sha256 a46200592eb193853527250da098e6bb0c75424e7a2c7db8da526c4f301c3d88
src/3rdparty/pffft/LICENSE
sha256 2513c5ad87ce9e7feed2c9a159d336f0a0d12ff93adcd411f7a15a1ab678f7ac
src/3rdparty/resonance-audio/COPYRIGHTS
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30
src/3rdparty/resonance-audio/LICENSE

Quoted 20 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +9 -0
new file mode 100644
index 0000000000..ed405fe7d0
@@ -0,0 +1,80 @@
 
+################################################################################
+#
+# qt6multimedia
+#
 
+################################################################################
+
+QT6MULTIMEDIA_VERSION = $(QT6_VERSION)
+QT6MULTIMEDIA_SITE = $(QT6_SITE)
+QT6MULTIMEDIA_SOURCE =

qtmultimedia-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6MULTIMEDIA_VERSION).tar.xz

package/qt6/qt6multimedia/qt6multimedia.mk

Quoted 2 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +2 -0
+QT6MULTIMEDIA_INSTALL_STAGING = YES
+

Maybe remove the spacing between the one-liners at the top of the file?

Quoted 4 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +3 -0
+QT6MULTIMEDIA_SUPPORTS_IN_SOURCE_BUILD = NO
+
+QT6MULTIMEDIA_CMAKE_BACKEND = ninja

package/qt6/qt6multimedia/qt6multimedia.mk line 24

Quoted 10 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +10 -0
+
+QT6MULTIMEDIA_LICENSE = \
+       BSD-3-Clause (docs, examples), \
+       BSL-1.0, \
+       GFDL-1.3 no invariants (docs), \
+       LGPL-2.1+, \
+       LGPL-3.0 or GPL-2.0 or GPL-3.0, \
+       MIT \
+       MPL-2.0
+

As a reference, the following is more complete license information for whats available in the repo:

QT6MULTIMEDIA_LICENSE = \
Apache-2.0 (resonance-audio), \
BSD-3-Clause (buildsystem, examples, pfft, snippets), \
BSL-1.0 (ffmpeg-boost), \
GFDL-1.3-no-invariants (docs), \
GPL-3.0 (tests), \
GPL-3.0 with Qt-GPL-exception-1.0 (utils), \
IJG (ffmpeg-libjpeg), \
LGPL-2.1+ and BSD-3-Clause and BSD-2-Clause and BSD-Source-Code and ISC and MIT and MPL-2.0 (ffmpeg), \
LGPL-3.0 or GPL-2.0 or GPL-3.0 (modules, plugins), \
LGPL-3.0 or GPL-3.0 (resonance-audio, spatialaudio, spatialaudioquick3d), \
MPL-2.0 and BSD-3-Clause (eigen), \
Zlib (ffmpeg-zlib)

But this should depend on what is actually installed on the image.

+QT6MULTIMEDIA_LICENSE_FILES = \

Quoted 8 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +7 -0
+    LICENSES/BSD-2-Clause.txt \
+    LICENSES/BSD-3-Clause.txt \
+    LICENSES/BSD-Source-Code.txt \
+    LICENSES/BSL-1.0.txt \
+    LICENSES/GFDL-1.3-no-invariants-only.txt \
+    LICENSES/GPL-2.0-only.txt \
+    LICENSES/GPL-3.0-only.txt \

package/qt6/qt6multimedia/qt6multimedia.mk line 42

Quoted 10 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +10 -0
+    LICENSES/IJG.txt \
+    LICENSES/ISC.txt \
+    LICENSES/LGPL-2.1-or-later.txt \
+    LICENSES/LGPL-3.0-only.txt \
+    LICENSES/LicenseRef-Qt-Commercial.txt \
+    LICENSES/MIT.txt \
+    LICENSES/MPL-2.0.txt \
+    LICENSES/Qt-GPL-exception-1.0.txt \
+    LICENSES/Zlib.txt
+

This is my autogenerated list:

QT6MULTIMEDIA_LICENSE_FILES = \
LICENSES/BSD-2-Clause.txt \
LICENSES/BSD-3-Clause.txt \
LICENSES/BSD-Source-Code.txt \
LICENSES/BSL-1.0.txt \
LICENSES/GFDL-1.3-no-invariants-only.txt \
LICENSES/GPL-2.0-only.txt \
LICENSES/GPL-3.0-only.txt \
LICENSES/IJG.txt \
LICENSES/ISC.txt \
LICENSES/LGPL-2.1-or-later.txt \
LICENSES/LGPL-3.0-only.txt \
LICENSES/MIT.txt \
LICENSES/MPL-2.0.txt \
LICENSES/Qt-GPL-exception-1.0.txt \
LICENSES/Zlib.txt \
src/3rdparty/eigen/COPYING.BSD \
src/3rdparty/eigen/COPYING.MPL2 \
src/3rdparty/eigen/COPYRIGHTS \
src/3rdparty/pffft/COPYRIGHTS \
src/3rdparty/pffft/LICENSE \
src/3rdparty/resonance-audio/COPYRIGHTS \
src/3rdparty/resonance-audio/LICENSE

This variable should probably also depend on what is actually installed on target.

package/qt6/qt6multimedia/qt6multimedia.mk line 49

Quoted 8 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +7 -0
+QT6MULTIMEDIA_CONF_OPTS = \
+       -DBUILD_WITH_PCH=OFF \
+       -DQT_BUILD_EXAMPLES=OFF \
+       -DQT_BUILD_TESTS=OFF
+       -DQT_HOST_PATH=$(HOST_DIR) \
+
+QT6MULTIMEDIA_DEPENDENCIES = \

I think you should add linux as a dependency here for v4l and dmabuf config test.

See ./src/multimedia/configure.cmake

package/qt6/qt6multimedia/qt6multimedia.mk line 59

Quoted 11 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +10 -0
+       qt6base \
+       qt6shadertools
+
+# Qt6 multimedia can build without the following packages.
+# The configuration process automatically detects the
+# libraries if present
+
+ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
+QT6MULTIMEDIA_DEPENDENCIES += alsa-lib
+endif

I think this is also needed according to ./src/multimedia/configure.cmake:

ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
QT6MULTIMEDIA_DEPENDENCIES += libegl
endif

package/qt6/qt6multimedia/qt6multimedia.mk line 64

Quoted 6 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +5 -0
+
+ifeq ($(BR2_PACKAGE_GSTREAMER1),y)
+QT6MULTIMEDIA_DEPENDENCIES += gstreamer1
+endif
+

See ./src/multimedia/configure.cmake:
...
qt_feature("gstreamer_1_0" PRIVATE
LABEL "GStreamer 1.0"
CONDITION GStreamer_FOUND
)
qt_feature("gstreamer_app" PRIVATE
LABEL "GStreamer App"
CONDITION ( QT_FEATURE_gstreamer_1_0 AND GStreamer_App_FOUND )
)
qt_feature("gstreamer_photography" PRIVATE
LABEL "GStreamer Photography"
CONDITION ( QT_FEATURE_gstreamer_1_0 AND GStreamer_Photography_FOUND )
)
qt_feature("gstreamer_gl" PRIVATE
LABEL "GStreamer OpenGL"
CONDITION QT_FEATURE_opengl AND QT_FEATURE_gstreamer_1_0 AND
GStreamer_Gl_FOUND AND EGL_FOUND
)
qt_feature("gstreamer" PRIVATE
LABEL "QtMM GStreamer plugin"
CONDITION (QT_FEATURE_gstreamer_1_0 AND QT_FEATURE_gstreamer_app) ENABLE INPUT_gstreamer STREQUAL 'yes'
DISABLE INPUT_gstreamer STREQUAL 'no'
)
...

I think the following looks more correct:

ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP),yy) QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_gstreamer=ON QT6MULTIMEDIA_DEPENDENCIES += \
gstreamer1 \
gst1-plugins-base
else
QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_gstreamer=OFF
endif

And if available maybe do the same for gstreamer_photography and gstreamer_gl?

package/qt6/qt6multimedia/qt6multimedia.mk line 68

Quoted 5 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +4 -0
+ifeq ($(BR2_PACKAGE_LIBVA),y)
+QT6MULTIMEDIA_DEPENDENCIES += libva
+endif
+

See ./src/multimedia/configure.cmake:
...
qt_feature("linux_v4l" PRIVATE
LABEL "Video for Linux"
CONDITION UNIX AND TEST_linux_v4l
)
qt_feature("linux_dmabuf" PRIVATE
LABEL "Linux DMA buffer support"
CONDITION UNIX AND TEST_linux_dmabuf
)
qt_feature("vaapi" PRIVATE
LABEL "VAAPI support"
CONDITION UNIX AND VAAPI_FOUND AND QT_FEATURE_linux_dmabuf
)

This is why I think you need to add the linux dependency as mentioned before.

package/qt6/qt6multimedia/qt6multimedia.mk line 79

Quoted 12 lines
package/qt6/qt6multimedia/qt6multimedia.mk new file +11 -0
+ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
+QT6MULTIMEDIA_DEPENDENCIES += pulseaudio
+ifeq ($(BR2_PACKAGE_FFMPEG),y)
+QT6MULTIMEDIA_DEPENDENCIES += ffmpeg
+endif
+endif
+
+ifeq ($(BR2_PACKAGE_QT6DECLARATIVE),y)
+QT6MULTIMEDIA_DEPENDENCIES += qt6declarative
+endif
+

I think you should also add:

ifeq ($(BR2_PACKAGE_QT6MULTIMEDIA_SPATIALAUDIO),y) QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_spatialaudio=ON else
QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_spatialaudio=OFF endif

Quoted 13 lines

And maybe we could add this now even though quick3d is not added yet?:

ifeq ($(BR2_PACKAGE_QT6QUICK3D),y)
QT6MULTIMEDIA_DEPENDENCIES += qt6quick3d
endif

Quoted 5 lines

+$(eval $(cmake-package))
--
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot