Jelajahi Sumber

package/qt6/qt6multimedia: ffmpeg support needs headers >= 5.2

The V4L2 code in the ffmpeg plugin uses V4L2_PIX_FMT_BGRA32 which was
only introduced in kernel headers 5.2, in upstream kernel commit
e25ec9141114c7124eeba09385e272dd76fbe617.

Fixes:

/home/thomas/buildroot/buildroot/outputs/qt/build/qt6multimedia-6.8.1/src/plugins/multimedia/ffmpeg/qv4l2camera.cpp:36:43: error: ‘V4L2_PIX_FMT_BGRA
32’ was not declared in this scope; did you mean ‘V4L2_PIX_FMT_BGR32’?
   36 |     { QVideoFrameFormat::Format_BGRA8888, V4L2_PIX_FMT_BGRA32  },
      |                                           ^~~~~~~~~~~~~~~~~~~
      |                                           V4L2_PIX_FMT_BGR32

when building:

 BR2_arm=y
 BR2_cortex_a9=y
 BR2_ARM_ENABLE_VFP=y
 BR2_TOOLCHAIN_EXTERNAL=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE=y
 BR2_PACKAGE_QT6=y
 BR2_PACKAGE_QT6BASE_XCB=y
 BR2_PACKAGE_QT6MULTIMEDIA=y
 BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG=y
 BR2_PACKAGE_XORG7=y

at a time when the Bootlin stable toolchain was using Linux 4.19
headers.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
(cherry picked from commit fe783b16b362e4d739ad8583ad6c5c02d626f13a)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Thomas Petazzoni 2 bulan lalu
induk
melakukan
9b7d8eb75e
1 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 7 0
      package/qt6/qt6multimedia/Config.in

+ 7 - 0
package/qt6/qt6multimedia/Config.in

@@ -28,10 +28,17 @@ config BR2_PACKAGE_QT6MULTIMEDIA_EXAMPLES
 	help
 	help
 	  This option enables the Qt6 Multimedia examples.
 	  This option enables the Qt6 Multimedia examples.
 
 
+comment "ffmpeg plugin needs kernel headers >= 5.2"
+	depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
+
 config BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG
 config BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG
 	bool "ffmpeg plugin"
 	bool "ffmpeg plugin"
 	depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC
 	depends on BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC
+	# V4L2_PIX_FMT_BGRA32
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
 	# qt6-multimedia ffmpeg plugin needs
 	# qt6-multimedia ffmpeg plugin needs
 	# qt6base-concurrent, PulseAudio and ffmpeg-swcale.
 	# qt6base-concurrent, PulseAudio and ffmpeg-swcale.
 	select BR2_PACKAGE_FFMPEG
 	select BR2_PACKAGE_FFMPEG