summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Negyokru <negyokru@inf.u-szeged.hu>2023-02-08 11:10:59 +0100
committerMartin Negyokru <negyokru@inf.u-szeged.hu>2023-09-04 11:15:57 +0200
commit855806fefdd52b29e8b15b6a02e263afc21028c8 (patch)
treeb7c353156442830d6d52eb70e459fb092a1d1387
parent00c524f3a8c164aed4eaee203f151fb18d5c4e90 (diff)
Add check for system ffmpeg compatibility
Chromium uses the 'first_dts' field from AVStream that has been moved out from public api in ffmpeg 5.0. Although some packagers patch their ffmpeg to be compatible with chromium. Add compile time check to test compatibility. Task-number: QTBUG-116553 Change-Id: I7658b9b12cb5122b6485f063edc3280f31fe9273 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 7e46ff40ab66cd480b3eb9d82594f402dd8b563e) Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--src/buildtools/configure.json26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index 88d1790c1..9e7a0c570 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -212,6 +212,27 @@
{ "type": "pkgConfig", "args": "libavcodec libavformat libavutil" }
]
},
+ "webengine-ffmpeg-support": {
+ "label": "compatible ffmpeg",
+ "type": "compile",
+ "test": {
+ "head": [
+ "#include <libavformat/version.h>",
+ "extern \"C\" {",
+ "#include <libavformat/avformat.h>",
+ "}"
+ ],
+ "main": [
+ "#if LIBAVFORMAT_VERSION_MAJOR >= 59",
+ "AVStream stream;",
+ "auto first_dts = av_stream_get_first_dts(&stream);",
+ "#endif"
+ ]
+ },
+ "sources": [
+ { "type": "pkgConfig", "args": "libavformat" }
+ ]
+ },
"webengine-opus": {
"label": "opus",
"sources": [
@@ -758,6 +779,11 @@
"type": "warning",
"condition": "config.ios && config.simulator && config.device && features.build-qtpdf",
"message": "Building fat libray with device and simulator architectures will disable NEON."
+ },
+ {
+ "type": "fatal",
+ "condition": "features.webengine-system-ffmpeg && !libs.webengine-ffmpeg-support",
+ "message": "Unmodified ffmpeg >= 5.0 is not supported. Please configure with -qt-webengine-ffmpeg."
}
],
"summary": [