From 1ae5c7869e99a06a3a7400d95d01b1ebfa1d7066c4f6393e647a96570a2a6656 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Wed, 4 Sep 2024 21:32:16 +0000 Subject: [PATCH] - Disable LTO on %{arm} to fix build OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.15/libqt5-qtwebengine?expand=0&rev=69 --- .gitattributes | 23 + .gitignore | 1 + ...tructor-in-place-of-self-delegation-.patch | 35 + ...me-includes-to-fix-build-with-GCC-12.patch | 27 + Add-missing-dependencies.patch | 12 + _constraints | 28 + _service | 14 + _servicedata | 4 + armv6-ffmpeg-no-thumb.patch | 13 + ...le-gpu-when-using-nouveau-boo-1005323.diff | 94 + libqt5-qtwebengine-rpmlintrc | 2 + libqt5-qtwebengine.changes | 1959 +++++++++++++++++ libqt5-qtwebengine.spec | 500 +++++ qt5-webengine-ffmpeg7.patch | 493 +++++ qt5-webengine-icu-75.patch | 102 + qtwebengine-everywhere-src-5.15.17.tar.xz | 3 + qtwebengine-ffmpeg5.patch | 153 ++ qtwebengine-pipewire-0.3.patch | 1764 +++++++++++++++ rtc-dont-use-h264.patch | 32 + sandbox_futex_time64.patch | 53 + 20 files changed, 5312 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Use-default-constructor-in-place-of-self-delegation-.patch create mode 100644 0001-skia-Some-includes-to-fix-build-with-GCC-12.patch create mode 100644 Add-missing-dependencies.patch create mode 100644 _constraints create mode 100644 _service create mode 100644 _servicedata create mode 100644 armv6-ffmpeg-no-thumb.patch create mode 100644 disable-gpu-when-using-nouveau-boo-1005323.diff create mode 100644 libqt5-qtwebengine-rpmlintrc create mode 100644 libqt5-qtwebengine.changes create mode 100644 libqt5-qtwebengine.spec create mode 100644 qt5-webengine-ffmpeg7.patch create mode 100644 qt5-webengine-icu-75.patch create mode 100644 qtwebengine-everywhere-src-5.15.17.tar.xz create mode 100644 qtwebengine-ffmpeg5.patch create mode 100644 qtwebengine-pipewire-0.3.patch create mode 100644 rtc-dont-use-h264.patch create mode 100644 sandbox_futex_time64.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Use-default-constructor-in-place-of-self-delegation-.patch b/0001-Use-default-constructor-in-place-of-self-delegation-.patch new file mode 100644 index 0000000..f476f1f --- /dev/null +++ b/0001-Use-default-constructor-in-place-of-self-delegation-.patch @@ -0,0 +1,35 @@ +From 1b74bce8ba1322d1853c7fd4467504a4a0d32d7b Mon Sep 17 00:00:00 2001 +From: Adam Klein +Date: Mon, 29 Nov 2021 15:11:39 -0800 +Subject: [PATCH] Use default constructor in place of self-delegation for + Symbol() + +This avoids a compile error when building with GCC in C++17 mode. + +Bug: v8:12449 +Change-Id: I14817895d31019fb71fc71b061f2ecf576dbc711 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307102 +Commit-Queue: Adam Klein +Reviewed-by: Leszek Swirski +Reviewed-by: Tobias Tebbi +Cr-Commit-Position: refs/heads/main@{#78171} +--- + src/3rdparty/chromium/v8/src/torque/earley-parser.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/3rdparty/chromium/v8/src/torque/earley-parser.h b/src/3rdparty/chromium/v8/src/torque/earley-parser.h +index e0dca24..0429fd2 100644 +--- a/src/3rdparty/chromium/v8/src/torque/earley-parser.h ++++ b/src/3rdparty/chromium/v8/src/torque/earley-parser.h +@@ -248,7 +248,7 @@ class Rule final { + // used in the parser. + class Symbol { + public: +- Symbol() : Symbol({}) {} ++ Symbol() = default; + Symbol(std::initializer_list rules) { *this = rules; } + + V8_EXPORT_PRIVATE Symbol& operator=(std::initializer_list rules); +-- +2.45.1 + diff --git a/0001-skia-Some-includes-to-fix-build-with-GCC-12.patch b/0001-skia-Some-includes-to-fix-build-with-GCC-12.patch new file mode 100644 index 0000000..e5e0344 --- /dev/null +++ b/0001-skia-Some-includes-to-fix-build-with-GCC-12.patch @@ -0,0 +1,27 @@ +From 68799a1e0815b20ca59ce354a55280399257a201 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Fri, 25 Mar 2022 15:29:28 +0100 +Subject: [PATCH] skia: Some includes to fix build with GCC 12 + +Those includes got introduced upstream for other reasons and fixed building +with GCC 12 as a side effect. +--- + src/3rdparty/chromium/third_party/skia/include/core/SkColor.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h b/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h +index 36527e38e53..f77c24ade82 100644 +--- a/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h ++++ b/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h +@@ -12,6 +12,8 @@ + #include "include/core/SkScalar.h" + #include "include/core/SkTypes.h" + ++#include ++ + /** \file SkColor.h + + Types, consts, functions, and macros for colors. +-- +2.34.1 + diff --git a/Add-missing-dependencies.patch b/Add-missing-dependencies.patch new file mode 100644 index 0000000..afce4f4 --- /dev/null +++ b/Add-missing-dependencies.patch @@ -0,0 +1,12 @@ +diff --git a/chromium/content/public/browser/BUILD.gn b/chromium/content/public/browser/BUILD.gn +index 7cf82a4aacf..0e0dda2c3ca 100644 +--- a/src/3rdparty/chromium/content/public/browser/BUILD.gn ++++ b/src/3rdparty/chromium/content/public/browser/BUILD.gn +@@ -469,6 +469,7 @@ jumbo_source_set("browser_sources") { + "//build:chromeos_buildflags", + "//cc", + "//components/viz/host", ++ "//components/spellcheck:buildflags", + "//content/browser", # Must not be public_deps! + "//device/fido", + "//gpu", diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..0274283 --- /dev/null +++ b/_constraints @@ -0,0 +1,28 @@ + + + + 12 + + + 14 + + + 12 + + 4 + + + + armv6l + armv7l + + + + 9 + + + 8 + + + + diff --git a/_service b/_service new file mode 100644 index 0000000..0b126fc --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + enable + 5.15.17 + git://code.qt.io/qt/qtwebengine.git + git + qtwebengine-everywhere-src + v5.15.17-lts + + + *.tar + xz + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..b0cfe13 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + git://code.qt.io/qt/qtwebengine.git + 17fd3176988586168bee8654008a097a5f23ec1d \ No newline at end of file diff --git a/armv6-ffmpeg-no-thumb.patch b/armv6-ffmpeg-no-thumb.patch new file mode 100644 index 0000000..a459331 --- /dev/null +++ b/armv6-ffmpeg-no-thumb.patch @@ -0,0 +1,13 @@ +Index: qtwebengine-everywhere-src-5.11.0-alpha/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h +=================================================================== +--- qtwebengine-everywhere-src-5.11.0-alpha.orig/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h ++++ qtwebengine-everywhere-src-5.11.0-alpha/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h +@@ -566,7 +566,7 @@ + #define CONFIG_NEON_CLOBBER_TEST 0 + #define CONFIG_OSSFUZZ 0 + #define CONFIG_PIC 1 +-#define CONFIG_THUMB 1 ++#define CONFIG_THUMB 0 + #define CONFIG_VALGRIND_BACKTRACE 0 + #define CONFIG_XMM_CLOBBER_TEST 0 + #define CONFIG_BSFS 1 diff --git a/disable-gpu-when-using-nouveau-boo-1005323.diff b/disable-gpu-when-using-nouveau-boo-1005323.diff new file mode 100644 index 0000000..82d429b --- /dev/null +++ b/disable-gpu-when-using-nouveau-boo-1005323.diff @@ -0,0 +1,94 @@ +From: Antonio Larrosa +Subject: Disable GPU when using nouveau or running on wayland +References: boo#1005323, boo#1060990 + +Qt WebEngine uses multi-threaded OpenGL, which nouveau does not support. +It also crashes when running on wayland, the cause is not yet known. +Work around these issues by not doing GPU-accelerated rendering in such +cases. + +Index: qtwebengine-everywhere-src-5.15.1/src/core/web_engine_context.cpp +=================================================================== +--- qtwebengine-everywhere-src-5.15.1.orig/src/core/web_engine_context.cpp ++++ qtwebengine-everywhere-src-5.15.1/src/core/web_engine_context.cpp +@@ -127,6 +127,7 @@ + #include + #if QT_CONFIG(opengl) + # include ++# include + #endif + #include + #include +@@ -186,6 +187,39 @@ void dummyGetPluginCallback(const std::v + } + #endif + ++#ifndef QT_NO_OPENGL ++QString openGLVendor() ++{ ++ QString vendor; ++ ++ QOpenGLContext *oldContext = QOpenGLContext::currentContext(); ++ QSurface *oldSurface = 0; ++ if (oldContext) ++ oldSurface = oldContext->surface(); ++ ++ QScopedPointer surface( new QOffscreenSurface ); ++ surface->create(); ++ QOpenGLContext context; ++ if (!context.create()) { ++ qDebug() << "Error creating openGL context"; ++ } ++ else if (!context.makeCurrent(surface.data())) { ++ qDebug() << "Error making openGL context current context"; ++ } else { ++ const GLubyte *p; ++ QOpenGLFunctions *f = context.functions(); ++ if ((p = f->glGetString(GL_VENDOR))) ++ vendor = QString::fromLatin1(reinterpret_cast(p)); ++ } ++ ++ context.doneCurrent(); ++ if (oldContext && oldSurface) ++ oldContext->makeCurrent(oldSurface); ++ ++ return vendor; ++} ++#endif ++ + } // namespace + + namespace QtWebEngineCore { +@@ -697,10 +731,31 @@ WebEngineContext::WebEngineContext() + const char *glType = 0; + #if QT_CONFIG(opengl) + ++ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU"); ++ ++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND") && qApp->platformName().startsWith("wayland", Qt::CaseInsensitive)) ++ { ++ qWarning() << "Running on wayland. Qt WebEngine will disable usage of the GPU.\n" ++ "Note: you can set the QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND\n" ++ "environment variable before running this application, but this is \n" ++ "not recommended since this usually causes applications to crash."; ++ disableGpu = true; ++ } ++ ++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau")) ++ { ++ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n" ++ "Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND\n" ++ "environment variable before running this application, but this is \n" ++ "not recommended since this usually causes applications to crash as\n" ++ "Nouveau openGL drivers don't support multithreaded rendering"; ++ disableGpu = true; ++ } ++ + const bool tryGL = (usingDefaultSGBackend() && !usingSoftwareDynamicGL() && + QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + || enableGLSoftwareRendering; +- if (tryGL) { ++ if (tryGL && !disableGpu) { + if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) { + // If the native handle is QEGLNativeContext try to use GL ES/2. + // If there is no native handle, assume we are using wayland and try GL ES/2. diff --git a/libqt5-qtwebengine-rpmlintrc b/libqt5-qtwebengine-rpmlintrc new file mode 100644 index 0000000..0f7d171 --- /dev/null +++ b/libqt5-qtwebengine-rpmlintrc @@ -0,0 +1,2 @@ +# Silence rpmlint error. The libraries SONAME won't change +addFilter("shlib-policy-name-error .*") diff --git a/libqt5-qtwebengine.changes b/libqt5-qtwebengine.changes new file mode 100644 index 0000000..7ba8fed --- /dev/null +++ b/libqt5-qtwebengine.changes @@ -0,0 +1,1959 @@ +------------------------------------------------------------------- +Wed Sep 4 14:27:07 UTC 2024 - Guillaume GARDET + +- Disable LTO on %{arm} to fix build + +------------------------------------------------------------------- +Thu Aug 29 14:32:28 UTC 2024 - Antonio Larrosa + +- Remove the unrar sources from the third_party directory in %prep + so we're sure not to use any code with a non-free license. + +------------------------------------------------------------------- +Wed Aug 7 13:10:01 UTC 2024 - Christophe Marin + +- Add ffmpeg 7 compatibility patch (Picked from Arch): + * qt5-webengine-ffmpeg7.patch + +------------------------------------------------------------------- +Sun Jun 9 17:46:23 UTC 2024 - Andreas Stieger + +- use bundled re2 (boo#1226119) + +------------------------------------------------------------------- +Thu May 23 00:21:22 UTC 2024 - Christophe Marin + +- Add compatibility patches for ICU 75: + * qt5-webengine-icu-75.patch + * 0001-Use-default-constructor-in-place-of-self-delegation-.patch +- Consequently build with a newer compiler on Leap 15 + +------------------------------------------------------------------- +Wed May 22 08:20:33 UTC 2024 - christophe@krop.fr + +- Update to version 5.15.17: + * Add option to chose python version for building 5.15 WebEngine + * Update Chromium. Backported fixes: + * [Backport] Security bug 325296797 + * [Backport] CVE-2024-1059: Use after free in WebRTC + * [Backport] Security bug 1518994 + * Fixup for [Backport] Security bug 1519980 + * [Backport] CVE-2024-1283: Heap buffer overflow in Skia + * [Backport] CVE-2024-1060: Use after free in Canvas + * [Backport] CVE-2024-1077: Use after free in Network + * [Backport] Security bug 1519980 + * [Backport] CVE-2024-0808: Integer underflow in WebUI + * [Backport] CVE-2024-0807: Use after free in WebAudio + * Fix ffmpeg assembly with newer binutil + * [Backport] Security bug 1511689 + * [Backport] CVE-2024-0224: Use after free in WebAudio + * [Backport] CVE-2023-7024: Heap buffer overflow in WebRTC + * [Backport] Security bug 1506535 + * [Backport] CVE-2024-0519: Out of bounds memory access in V8 + * [Backport] CVE-2024-0518: Type Confusion in V8 + * [Backport] CVE-2024-0333: Insufficient data validation in Extensions + * [Backport] CVE-2024-0222: Use after free in ANGLE + * Fixup: [Backport] Security bug 1488199 + * FIXUP: Fix compilation with system ICU + * Fixup: [Backport] Security bug 1505632 + * [Backport] Security bug 1505632 + * [Backport] CVE-2023-6702: Type Confusion in V8 + * [Backport] CVE-2023-6345: Integer overflow in Skia + * Bump V8_PATCH_LEVEL + * [Backport] Security bug 1488199 (2/2) + * [Backport] Security bug 1488199 (1/2) + * [Backport] CVE-2023-6510: Use after free in Media Capture + * Fix building with system libxml2 + * [Backport] CVE-2023-6347: Use after free in Mojo + * [Backport] CVE-2023-6112: Use after free in Navigation + * [Backport] CVE-2023-5997: Use after free in Garbage Collection +- Drop patches, merged upstream: + * 0001-Fix-building-with-system-libxml2.patch + * qtwebengine-python3.patch + * python311-fixes.patch +- Update _service file, catapult snapshots are not needed anymore + +------------------------------------------------------------------- +Fri May 17 05:53:59 UTC 2024 - Christoph G + +- Backport Ninja 1.12 compatibility patch (and adjust paths) + Add-missing-dependencies.patch from upstream + +------------------------------------------------------------------- +Fri Apr 19 14:57:37 UTC 2024 - Christophe Marin + +- Add patch to fix build with libxml >= 2.12: + * 0001-Fix-building-with-system-libxml2.patch + +------------------------------------------------------------------- +Sat Feb 24 11:06:56 UTC 2024 - Jan Engelhardt + +- Drop BuildRequire on libsrtp, qt builds a bundled copy. + +------------------------------------------------------------------- +Tue Feb 20 14:42:07 UTC 2024 - Christophe Marin + +- Switch to '%patch -P' +- Build with python 3.11 on Leap + +------------------------------------------------------------------- +Wed Nov 22 09:44:27 UTC 2023 - christophe@krop.fr + +- Update to version 5.15.16: + * Bump version to 5.15.16 + * Add check for system ffmpeg compatibility + * Fix handling of external URLs in PDFs + * Update Chromium: + * [Backport] CVE-2023-5996: Use after free in WebAudio + * [Backport] CVE-2023-5482 and CVE-2023-5849 + * [Backport] CVE-2023-45853: Buffer overflow in MiniZip + * [Backport] Security bug 1478470 + * [Backport] Security bug 1472365 and 1472366 + * [Backport] CVE-2023-5218: Use after free in Site Isolation + * [Backport] Security bug 1486316 + * FIXUP: [Backport] [PA] Support 16kb pagesize on Linux+ARM64 + * [Backport] Add Intel Meteorlake GPU series type + * [Backport] Add Intel Raptorlake GPU series type + * [Backport] Add a few missing IntelGpuSeriesTypes in + gpu_util.cc + * [Backport] Add Intel Alchemist GPU series type + * [Backport] Add Alderlake to intel_gpu_series field in gpu + control list. + * [Backport] Add missing Intel GPU series types. + * [Backport] Add Alderlake's GPU to list supporting two NV12 + overlay planes. + * [Backport] CVE-2023-5217: Heap buffer overflow in vp8 + encoding in libvpx + * [Backport] Security bug 1479104 + * [Backport] [PA] Support 16kb pagesize on Linux+ARM64 + * [Backport] Replace uses of re2::StringPiece::set(). + * Fix build with GCC 13 + * Fix errors and warnings for perfetto + * Remove nodiscard attribute from cpwl_combo_box.h + * Bump V8_PATCH_LEVEL + * [Backport] CVE-2023-4762: Type Confusion in V8 + * [Backport] CVE-2023-4362: Heap buffer overflow in Mojom IDL + * [Backport] CVE-2023-4354: Heap buffer overflow in Skia + * [Backport] CVE-2023-4351: Use after free in Network + * Disable Windows IME for GPU thread + * [Backport] CVE-2023-4863: Heap buffer overflow in WebP + * [Backport] Security bug 1465224 + * [Backport] Dependency for security bug 1465224 + * [Backport] CVE-2023-4071: Heap buffer overflow in Visuals + * [Backport] CVE-2023-4076: Use after free in WebRTC + * [Backport] CVE-2023-4074: Use after free in Blink Task + Scheduling + +------------------------------------------------------------------- +Fri Sep 01 08:27:14 UTC 2023 - christophe@krop.fr + +- Update to version 5.15.15: + * Update Chromium: + * [Backport] Security bug 1454860 + * Further fixes for building with GCC 13 + * Fixup [Backport] CVE-2023-2935: Type Confusion in V8 + * [Backport] Security bug 1447430 + * [Backport] CVE-2023-2930: Use after free in Extensions + * [Backport] CVE-2023-3079: Type Confusion in V8 + * [Backport] CVE-2023-3216: Type Confusion in V8 + * [Backport] CVE-2023-2933: Use after free in PDF + * [Backport] CVE-2023-2935: Type Confusion in V8 + * [Backport] CVE-2023-2932: Use after free in PDF + * [Backport] CVE-2023-2931: Use after free in PDF + * [Backport] Security bug 1444195 + * [Backport] Security bug 1428743 + * [Backport] CVE-2023-2721: Use after free in Navigation + +------------------------------------------------------------------- +Fri Jul 28 19:03:30 UTC 2023 - Andreas Stieger + +- build with older re2 on Tumbleweed, the upcoming re2 2023-07-01 + breaks qtwebengine + +------------------------------------------------------------------- +Thu May 25 15:01:57 UTC 2023 - christophe@krop.fr + +- Update to version 5.15.14: + * Blacklist TouchInputTest::touchTap for sles 15.4 + * Blacklist tst_QWebEnginePage::mouseMovementProperties for SLES-15 + * Do not allow universal with debug builds + * Enable accessibility by default on Linux + * Fix blacklisting of mouseMovementProperties for sles 15.4 + * Fix build with GCC 13 + * Fix initialization of QWebEngineDownloadItem::totalBytes for Widgets + * Fix memory management in QPdfDocument functions + * Update Chromium: + * Fixes for building with GCC-13 + * [Backport] CVE-2023-1215: Type Confusion in CSS + * [Backport] CVE-2023-1217: Stack buffer overflow in Crash reporting + * [Backport] CVE-2023-1219: Heap buffer overflow in Metrics + * [Backport] CVE-2023-1220: Heap buffer overflow in UMA + * [Backport] CVE-2023-1222: Heap buffer overflow in Web Audio API + * [Backport] CVE-2023-1529: Out of bounds memory access in WebHID + * [Backport] CVE-2023-1530: Use after free in PDF + * [Backport] CVE-2023-1531: Use after free in ANGLE + * [Backport] CVE-2023-1534: Out of bounds read in ANGLE + * [Backport] CVE-2023-1810: Heap buffer overflow in Visuals + * [Backport] CVE-2023-1811: Use after free in Frames + * [Backport] CVE-2023-2033: Type Confusion in V8 + * [Backport] CVE-2023-2137: Heap buffer overflow in sqlite + * [Backport] CVE-2023-29469 / Security bug 1433328 + * [Backport] Security bug 1337747 + * [Backport] Security bug 1417585 + * [Backport] Security bug 1418734 + * [Backport] Security bug 1423360 + * [Backport] Security bug 1427388 +- Drop patch, merged upstream: + * 0001-Fixes-for-building-with-GCC-13.patch + +------------------------------------------------------------------- +Fri Apr 28 21:20:40 UTC 2023 - Dirk Müller + +- add python311-fixes.patch: + * Fix build when python3 is python 3.11+ + +------------------------------------------------------------------- +Tue Apr 11 19:28:44 UTC 2023 - Christophe Marin + +- Add patch to fix build with GCC 13 (boo#1207469): + * 0001-Fixes-for-building-with-GCC-13.patch + +------------------------------------------------------------------- +Thu Mar 09 10:11:11 UTC 2023 - christophe@krop.fr + +- Update to version 5.15.13: + * Force to disable IPC logging + * Move out GetInProcessGpuShareGroup form content browser client + * Fix probabilistic signature scheme + * Bump version to 5.15.13 + * Recreate response head objects on multiple redirect + * Add checksum to mailbox name in Release build too + * Drop dependency on content/public/browser in content gpu + * FIXUP: Mark Node::opcode() and Operator::opcode() + as constexpr + * [Backport] Add missing include for std::begin and std::end + in SkParseColor.cpp + * [Backport] CVE-2022-4179: Use after free in Audio + * [Backport] CVE-2022-4437: Use after free in Mojo IPC + * [Backport] CVE-2022-4438: Use after free in Blink Frames + * [Backport] CVE-2023-0129: Heap buffer overflow in + Network Service + * [Backport] CVE-2023-0472: Use after free in WebRTC + * [Backport] CVE-2023-0698: Out of bounds read in WebRTC + * [Backport] CVE-2023-0931: Use after free in Video + * [Backport] CVE-2023-0933: Integer overflow in PDF + * [Backport] Disable ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE + for clang-cl + * [Backport] Fix more clang deprecated builtins + * [Backport] Map the absl::is_trivially_* functions to their + std impl + * [Backport] Mark Node::opcode() and Operator::opcode() + as constexpr + * [Backport] Security bug 1393384 + * [Backport] Security bug 1394382 + * [Backport] Security bug 1399424 + * [Backport] Security bug 1406115 + * [Backport][Windows] Remove unused sidestep intercepts +- Update 0001-skia-Some-includes-to-fix-build-with-GCC-12.patch + +------------------------------------------------------------------- +Thu Mar 9 08:51:39 UTC 2023 - Martin Liška + +- Use gcc12 for openSUSE:Factory as workaround for boo#1207469. + +------------------------------------------------------------------- +Thu Dec 29 15:26:07 UTC 2022 - christophe@krop.fr + +- Update to version 5.15.12: + * Bump version to 5.15.12 + * Update Chromium: + * Bump V8_PATCH_LEVEL + * Fixup for patch for CVE-2022-3200 on OpenSuse 15.1 + * Fixup the patch for CVE-2022-3200 on 87-based / 5.15 + * [Backport] CVE-2022-3038: Use after free in Network Service + * [Backport] CVE-2022-3040: Use after free in Layout + * [Backport] CVE-2022-3041: Use after free in WebSQL + * [Backport] CVE-2022-3046: Use after free in Browser Tag + * [Backport] CVE-2022-3075: Insufficient data validation in Mojo + * [Backport] CVE-2022-3196: Use after free in PDF + * [Backport] CVE-2022-3197: Use after free in PDF + * [Backport] CVE-2022-3198: Use after free in PDF + * [Backport] CVE-2022-3199: Use after free in Frames. + * [Backport] CVE-2022-3200: Heap buffer overflow in Internals + * [Backport] CVE-2022-3201: Insufficient validation of untrusted + input in Developer Tools (1/2) + * [Backport] CVE-2022-3201: Insufficient validation of untrusted + input in Developer Tools (2/2) + * [Backport] CVE-2022-3304: Use after free in CSS + * [Backport] CVE-2022-3370: Use after free in Custom Elements + * [Backport] CVE-2022-3373: Out of bounds write in V8 + * [Backport] CVE-2022-3445: Use after free in Skia. + * [Backport] CVE-2022-3446 and CVE-2022-35737 + * [Backport] CVE-2022-3885: Use after free in V8 + * [Backport] CVE-2022-3887: Use after free in Web Workers + * [Backport] CVE-2022-3889: Type Confusion in V8 + * [Backport] CVE-2022-3890: Heap buffer overflow in Crashpad + * [Backport] CVE-2022-4174: Type Confusion in V8 + * [Backport] CVE-2022-4180: Use after free in Mojo + * [Backport] CVE-2022-4181: Use after free in Forms + * [Backport] CVE-2022-4262: Type Confusion in V8 + * [Backport] Security bug 1356308 + * [Backport] Security bug 1378916 + * [Backport] Security bugs 1346938 and 1338114 + +------------------------------------------------------------------- +Wed Oct 05 17:28:40 UTC 2022 - christophe@krop.fr + +- Update to version 5.15.11: + * Work-around GNOME bug misidentifying HTML content + * Fix busy waiting on streaming QIODevice's + * Add workaround for un-minimizing QWebEngineView under Gnome + * Build the QtDesigner plugin in all configurations + * Bump version to 5.15.11 + * Fix method check + * Do not use the native dialog to show the color picker on macOS + * FIXUP: Add workaround for unstable gn on macOS in ci + * Fix top level build with no widget + * Fix touch input for widget's delegate for html popup + * Keep page's zoom level on loading new urls + * Fix leak if loader error is seen first + * Add workaround for unstable gn on macOS in ci + * Pass archiver to gn build + * Fix read-after-free on EGL extensions + * Update Chromium: + * FIXUP: Fix url_utils for QtWebEngine + * FIXUP: Workaround MSVC2022 ICE in constexpr functions + * Fixup: CVE-2022-0796: Use after free in Media + * [Backport] CVE-2022-0796: Use after free in Media + * [Backport] CVE-2022-1855: Use after free in Messaging + * [Backport] CVE-2022-1857: Insufficient policy enforcement in + File System API + * [Backport] CVE-2022-2008: Out of bounds memory access in WebGL + * [Backport] CVE-2022-2010: Out of bounds read in compositing + * [Backport] CVE-2022-2158: Type Confusion in V8 + * [Backport] CVE-2022-2160: Insufficient policy enforcement + in DevTools + * [Backport] CVE-2022-2162: Insufficient policy enforcement in + File System API + * [Backport] CVE-2022-2294: Heap buffer overflow in WebRTC + * [Backport] CVE-2022-2295: Type Confusion in V8 + * [Backport] CVE-2022-2477 : Use after free in Guest View + * [Backport] CVE-2022-2610: Insufficient policy enforcement + in Background Fetch + * [Backport] CVE-2022-27404 + * [Backport] CVE-2022-27405 + * [Backport] CVE-2022-27406 + * [Backport] Linux sandbox: ENOSYS for some statx syscalls + * [Backport] Security bug 1287804 + * [Backport] Security bug 1316578 + * [Backport] Security bug 1343889 +- Replace sandbox-statx-futex_time64.patch with upstream change: + * sandbox_futex_time64.patch + +------------------------------------------------------------------- +Mon Sep 26 14:35:08 UTC 2022 - Christophe Giboudeaux + +- Use python 3.9 to build qtwebengine on Leap 15. + +------------------------------------------------------------------- +Fri Sep 23 18:01:11 UTC 2022 - Christophe Giboudeaux + +- Add patches to build with python 3, ffmpeg 5 and pipewire 0.3: + * qtwebengine-ffmpeg5.patch + * qtwebengine-pipewire-0.3.patch + * qtwebengine-python3.patch +- Use a newer catapult snapshot when building with python3 + +------------------------------------------------------------------- +Mon Aug 8 06:45:29 UTC 2022 - Christophe Giboudeaux + +- Stop using 'pkgconfig(xxx)' BuildRequires for FFmpeg + dependencies. They will point to FFmpeg-5 soon. + +------------------------------------------------------------------- +Wed Jun 8 14:36:14 UTC 2022 - Christophe Giboudeaux + +- Update to version 5.15.10: + * Fix top level build with no widget + * Fix read-after-free on EGL extensions + * Update Chromium + * Add workaround for unstable gn on macOS in ci + * Pass archiver to gn build + * Fix navigation to non-local URLs + * Add support for universal builds for qtwebengine and qtpdf + * Enable Apple Silicon support + * Fix cross compilation x86_64->arm64 on mac + * Bump version to 5.15.10 + * CustomDialogs: Make custom input fields readable in dark mode + * CookieBrowser: Make alternating rows readable in dark mode + * Update Chromium: + * Bump V8_PATCH_LEVEL + * Fix clang set-but-unused-variable warning + * Fix mac toolchain python linker script call + * Fix missing dependency for gpu sources + * Fix python calls + * Fix undefined symbol for universal link + * Quick fix for regression in service workers by reverting + backports + * [Backport] CVE-2022-0797: Out of bounds memory access + in Mojo + * [Backport] CVE-2022-1125 + * [Backport] CVE-2022-1138: Inappropriate implementation + in Web Cursor. + * [Backport] CVE-2022-1305: Use after free in storage + * [Backport] CVE-2022-1310: Use after free in regular + expressions + * [Backport] CVE-2022-1314: Type Confusion in V8 + * [Backport] CVE-2022-1493: Use after free in Dev Tools + * [Backport] On arm64 hosts, set host_cpu to 'arm64', not 'arm' + * [Backport] Security Bug 1296876 + * [Backport] Security bug 1269999 + * [Backport] Security bug 1280852 + * [Backport] Security bug 1292905 + * [Backport] Security bug 1304659 + * [Backport] Security bug 1306507 + +------------------------------------------------------------------- +Mon May 2 08:30:15 UTC 2022 - Martin Liška + +- Remove dependency on binutils-gold as the package will be removed + in the future. Gold linker is unmaintained by the upstream project. + +------------------------------------------------------------------- +Wed Apr 27 07:34:23 UTC 2022 - Christophe Giboudeaux + +- Add libqt5-qtwebengine-rpmlintrc to silence the + 'shlib-policy-name-error' rpmlint error + +------------------------------------------------------------------- +Wed Apr 06 14:41:04 UTC 2022 - christophe@krop.fr + +- Update to version 5.15.9: + * QPdfView: scale page rendering according to devicePixelRatio + * Update documented Chromium version + * Use IsSameDocument() rather than IsLoadingToDifferentDocument() + * Update module-split for installer + * Fix printing PDF files + * Do not override signal handlers + * Avoid using xkbcommon in non-X11 builds + * Update documentation + * Update Chromium: + * Bump V8_PATCH_LEVEL + * Do not overwrite signal handlers in the browser process. + * Replace base::ranges::set_union with std::set_union to fix + MSVC2017 build + * [Backport] CVE-2022-0100: Heap buffer overflow in Media + streams API + * [Backport] CVE-2022-0102: Type Confusion in V8 + * [Backport] CVE-2022-0103: Use after free in SwiftShader + * [Backport] CVE-2022-0104: Heap buffer overflow in ANGLE + * [Backport] CVE-2022-0108: Inappropriate implementation + in Navigation + * [Backport] CVE-2022-0109: Inappropriate implementation + in Autofill + * [Backport] CVE-2022-0111 and CVE-2022-0117 + * [Backport] CVE-2022-0113: Inappropriate implementatio + n in Blink + * [Backport] CVE-2022-0116: Inappropriate implementation + in Compositing + * [Backport] CVE-2022-0289: Use after free in Safe browsing + * [Backport] CVE-2022-0291: Inappropriate implementation + in Storage + * [Backport] CVE-2022-0293: Use after free in Web packaging + * [Backport] CVE-2022-0298: Use after free in Scheduling + * [Backport] CVE-2022-0305: Inappropriate implementation in + Service Worker API + * [Backport] CVE-2022-0306: Heap buffer overflow in PDFium + * [Backport] CVE-2022-0310 and CVE-0311: Heap buffer overflow + in Task Manager + * [Backport] CVE-2022-0456: Use after free in Web Search + * [Backport] CVE-2022-0459: Use after free in Screen Capture + * [Backport] CVE-2022-0460: Use after free in Window Dialog + * [Backport] CVE-2022-0461: Policy bypass in COOP + * [Backport] CVE-2022-0606: Use after free in ANGLE + * [Backport] CVE-2022-0607: Use after free in GPU + * [Backport] CVE-2022-0608: Integer overflow in Mojo + * [Backport] CVE-2022-0609: Use after free in Animation + * [Backport] CVE-2022-0610: Inappropriate implementation + in Gamepad API + * [Backport] CVE-2022-0971 (boo#1197163) + * [Backport] CVE-2022-1096 (boo#1197552) + * [Backport] CVE-2022-23852 + * [Backport] Copy 'name_' member during StyleRuleProperty::Copy + * [Backport] Security bug 1256885 + * [Backport] Security bug 1258603 + * [Backport] Security bug 1259557 + * [Backport] Security bug 1261415 + * [Backport] Security bug 1265570 + * [Backport] Security bug 1268448 + * [Backport] Security bug 1270014 + * [Backport] Security bug 1274113 + * [Backport] Security bug 1276331 + * [Backport] Security bug 1280743 + * [Backport] Security bug 1289394 + * [Backport] Security bug 1292537 + * [Backport] sandbox: build if glibc 2.34+ dynamic stack size + is enabled +- Drop patches, now upstream: + * CVE-2022-0971-qtwebengine-5.15.patch + * CVE-2022-1096-qtwebengine-5.15.patch + +------------------------------------------------------------------- +Mon Apr 4 19:25:12 UTC 2022 - Christophe Giboudeaux + +- Add security fixes: + * CVE-2022-0971-qtwebengine-5.15.patch (CVE-2022-0971, boo#1197163) + * CVE-2022-1096-qtwebengine-5.15.patch (CVE-2022-1096, boo#1197552) + +------------------------------------------------------------------- +Fri Mar 25 14:31:28 UTC 2022 - Fabian Vogt + +- Add patch to fix build with GCC 12: + * 0001-skia-Some-includes-to-fix-build-with-GCC-12.patch + +------------------------------------------------------------------- +Tue Jan 04 22:22:01 UTC 2022 - christophe@krop.fr + +- Update to version 5.15.8: + * Update Chromium: + [Backport] CVE-2021-3517: libxml2: Heap-based buffer overflow + in xmlEncodeEntitiesInternal() in entities.c + [Backport] CVE-2021-3541 libxml2: Exponential entity expansion + attack bypasses all existing protection mechanisms + [Backport] CVE-2021-37984 : Heap buffer overflow in PDFium + [Backport] CVE-2021-37987 : Use after free in Network APIs + [Backport] CVE-2021-37989 : Inappropriate implementation in Blink + [Backport] CVE-2021-37992 : Out of bounds read in WebAudio + [Backport] CVE-2021-37993 : Use after free in PDF Accessibility + [Backport] CVE-2021-37996 : Insufficient validation of untrusted + input in Downloads + [Backport] CVE-2021-38001 : Type Confusion in V8 + [Backport] CVE-2021-38003 : Inappropriate implementation in V8 + [Backport] CVE-2021-38005: Use after free in loader (1/3) + [Backport] CVE-2021-38005: Use after free in loader (2/3) + [Backport] CVE-2021-38005: Use after free in loader (3/3) + [Backport] CVE-2021-38007: Type Confusion in V8 + [Backport] CVE-2021-38009: Inappropriate implementation in cache + [Backport] CVE-2021-38010: Inappropriate implementation in serviceworkers + [Backport] CVE-2021-38012: Type Confusion in V8 + [Backport] CVE-2021-38015: Inappropriate implementation in input + [Backport] CVE-2021-38017: Insufficient policy enforcement in iframe + sandbox + [Backport] CVE-2021-38018: Inappropriate implementation in navigation + [Backport] CVE-2021-38019: Insufficient policy enforcement in CORS + [Backport] CVE-2021-38021: Inappropriate implementation in referrer + [Backport] CVE-2021-38022: Inappropriate implementation in WebAuthentication + [Backport] CVE-2021-4057: Use after free in file API + [Backport] CVE-2021-4058: Heap buffer overflow in ANGLE (1/2) + [Backport] CVE-2021-4058: Heap buffer overflow in ANGLE (2/2) + [Backport] CVE-2021-4059: Insufficient data validation in loader + [Backport] CVE-2021-4062: Heap buffer overflow in BFCache + [Backport] CVE-2021-4078: Type confusion in V8 + [Backport] CVE-2021-4079: Out of bounds write in WebRTC + [Backport] CVE-2021-4098: Insufficient data validation in Mojo + [Backport] CVE-2021-4099: Use after free in Swiftshader + [Backport] CVE-2021-4101: Heap buffer overflow in Swiftshader. + [Backport] CVE-2021-4102: Use after free in V8 + [Backport] Dependency for CVE-2021-37989 + [Backport] Dependency for CVE-2021-38009 + [Backport] Security bug 1245870 + [Backport] Security bug 1252858 + [Backport] Security bug 1259899 + Bump V8_PATCH_LEVEL + Compile with GCC 11 -std=c++20 + Fix stack overflow on gpu channel recreate with an error + Use wglSetPixelFormat directly only if in software mode + [Backport] Handle long SIGSTKSZ in glibc > 2.33 + [Backport] abseil-cpp: Fixes build with latest glibc + * Handle qtpdf compilation with static runtime + * Add bitcode support for qtpdf on ios + * Do not access accessibility from qt post routines + * Blacklist javascriptClipboard test on ubuntu 20.04 + * Re-enable network-service-in-process + * Bump version from 5.15.7 to 5.15.8 + * Update patch level + * Fix pinch gesture + * Fix leak of properties after XkbRF_GetNamesProp + * Fix leak on getDefaultScreeenId +- Drop patch: + * 0001-Fix-build-with-glibc-2.34.patch + +------------------------------------------------------------------- +Fri Oct 29 09:53:05 UTC 2021 - christophe@krop.fr + +- Update to version 5.15.7: + * Update Chromium: + [Backport] Linux sandbox: update syscalls numbers on 32-bit platforms + [Backport] sandbox: linux: allow clock_nanosleep & gettime64 + [Backport] Linux sandbox: update syscall numbers for all platforms. + [Backport] Ease HarfBuzz API change with feature detection + [Backport] Security bug 1248665 + [Backport] CVE-2021-37975 : Use after free in V8 + [Backport] CVE-2021-37980 : Inappropriate implementation in Sandbox + [Backport] CVE-2021-37979 : Heap buffer overflow in WebRTC (2/2) + [Backport] CVE-2021-37979 : Heap buffer overflow in WebRTC (1/2) + [Backport] CVE-2021-37978 : Heap buffer overflow in Blink + [Backport] CVE-2021-30616: Use after free in Media. + [Backport] CVE-2021-37962 : Use after free in Performance Manager (2/2) + [Backport] CVE-2021-37962 : Use after free in Performance Manager (1/2) + [Backport] CVE-2021-37973 : Use after free in Portals + [Backport] CVE-2021-37971 : Incorrect security UI in Web Browser UI. + [Backport] CVE-2021-37968 : Inappropriate implementation in Background Fetch API + [Backport] CVE-2021-37967 : Inappropriate implementation in Background Fetch API + [Backport] Linux sandbox: return ENOSYS for clone3 + [Backport] Linux sandbox: fix fstatat() crash + [Backport] Reland "Reland "Linux sandbox syscall broker: use struct kernel_stat"" + [Backport] Security bug 1238178 (2/2) + [Backport] Security bug 1238178 (1/2) + [Backport] CVE-2021-30633: Use after free in Indexed DB API (2/2) + [Backport] CVE-2021-30633: Use after free in Indexed DB API (1/2) + [Backport] CVE-2021-30630: Inappropriate implementation in Blink + [Backport] CVE-2021-30629: Use after free in Permissions + [Backport] CVE-2021-30628: Stack buffer overflow in ANGLE + [Backport] CVE-2021-30627: Type Confusion in Blink layout + [Backport] CVE-2021-30626: Out of bounds memory access in ANGLE + [Backport] CVE-2021-30625: Use after free in Selection API + [Backport] Security bug 1206289 + [Backport] CVE-2021-30613: Use after free in Base internals + [Backport] Security bug 1227228 + [Backport] CVE-2021-30618: Inappropriate implementation in DevTools + * Update patch level + * Blacklist certificate test until certicates have been renewed + * Block CORS from local URLs when remote access is not enabled + * Do not wait on weak_pointer for termination errors + * Support MSVC_VER 16.8 + * Fix wrong save file filter for Markdown Editor example + * Add Chromium version source documentation + * Bump version from 5.15.6 to 5.15.7 + * Fix crash when clicking on a link in PDF +- Drop openSUSE patches: + * fix1163766.patch. Should be addressed with: + https://github.com/qt/qtwebengine-chromium/commit/652f834de + https://github.com/qt/qtwebengine-chromium/commit/faae106ed + https://github.com/qt/qtwebengine-chromium/commit/6b7b3f1bf + * chromium-glibc-2.33.patch. Should be addressed with the + [Backport] Linux sandbox: fix fstatat() crash and + Reland "Reland "Linux sandbox syscall broker: use struct kernel_stat"" + changes. + * chromium-older-harfbuzz.patch +- Drop upstream changes: + * 0001-return-ENOSYS-for-clone3.patch + * chromium-harfbuzz-3.0.0.patch + * skia-harfbuzz-3.0.0.patch +- Rebase patches: + * sandbox-statx-futex_time64.patch + +------------------------------------------------------------------- +Tue Sep 21 11:34:41 UTC 2021 - Fabian Vogt + +- Add patches from Arch to fix build with HarfBuzz 3.0.0: + * chromium-harfbuzz-3.0.0.patch + * skia-harfbuzz-3.0.0.patch +- ... but don't break with < 2.9.0: + * chromium-older-harfbuzz.patch + +------------------------------------------------------------------- +Thu Sep 09 07:19:58 UTC 2021 - christophe@krop.fr + +- Update to version 5.15.6: + * Update Chromium: + + [Backport] CVE-2021-30560: Use after free in Blink XSLT + + [Backport] CVE-2021-30566: Stack buffer overflow in Printing + + [Backport] CVE-2021-30585: Use after free in sensor handling + + Bump V8_PATCH_LEVEL + + [Backport] Security bug 1228036 + + [Backport] CVE-2021-30604: Use after free in ANGLE + + [Backport] CVE-2021-30603: Race in WebAudio + + [Backport] CVE-2021-30602: Use after free in WebRTC + + [Backport] CVE-2021-30599: Type Confusion in V8 + + [Backport] CVE-2021-30598: Type Confusion in V8 + + [Backport] Security bug 1227933 + + [Backport] Security bug 1205059 + + [Backport] Security bug 1184294 + + [Backport] Security bug 1198385 + + [Backport] CVE-2021-30588: Type Confusion in V8 + + [Backport] CVE-2021-30587: Inappropriate implementation in Compositing on Windows + + [Backport] CVE-2021-30573: Use after free in GPU + + [Backport] CVE-2021-30569, security bugs 1198216 and 1204814 + + [Backport] CVE-2021-30568: Heap buffer overflow in WebGL + + [Backport] CVE-2021-30541: Use after free in V8 + + [Backport] Security bugs 1197786 and 1194330 + + [Backport] Security bug 1194689 + + [Backport] CVE-2021-30563: Type Confusion in V8 + + [Backport] Security bug 1211215 + + [Backport] Security bug 1209558 + + [Backport] CVE-2021-30553: Use after free in Network service + + [Backport] CVE-2021-30548: Use after free in Loader + + [Backport] CVE-2021-30547: Out of bounds write in ANGLE + + [Backport] CVE-2021-30556: Use after free in WebAudio + + [Backport] CVE-2021-30559: Out of bounds write in ANGLE + + [Backport] CVE-2021-30533: Insufficient policy enforcement in PopupBlocker + + [Backport] Security bug 1202534 + + [Backport] CVE-2021-30536: Out of bounds read in V8 + + [Backport] CVE-2021-30522: Use after free in WebAudio + + [Backport] CVE-2021-30554 Use after free in WebGL + + [Backport] CVE-2021-30551: Type Confusion in V8 + + [Backport] CVE-2021-30544: Use after free in BFCache + + [Backport] CVE-2021-30535: Double free in ICU + + [Backport] CVE-2021-30534: Insufficient policy enforcement in iFrameSandbox + + [Backport] CVE-2021-30530: Out of bounds memory access in WebAudio + + [Backport] CVE-2021-30523: Use after free in WebRTC + + Generate mojo bindings before compiling extension API registration + * Bump version from 5.15.5 to 5.15.6 + * Always send phased wheel events beginning with Began +- Import patch from the chromium package: + * 0001-return-ENOSYS-for-clone3.patch +- Add changes from the chromium package to + 0001-Fix-build-with-glibc-2.34.patch + +------------------------------------------------------------------- +Wed Aug 4 15:23:24 UTC 2021 - Christophe Giboudeaux + +- Add patch to fix build with glibc 2.34 (boo#1189095) + * 0001-Fix-build-with-glibc-2.34.patch + +------------------------------------------------------------------- +Thu Jun 24 16:39:27 UTC 2021 - Christophe Giboudeaux + +- Update the CMake version workaround to get qtbase's real version + +------------------------------------------------------------------- +Tue Jun 22 09:00:44 UTC 2021 - christophe@krop.fr + +- Update to version 5.15.5: + * Abort findText also right on explicit navigation request + * Adapt to new Connections syntax + * Add devtools eyedropper support + * Add more tests to tst_loadsignals + * Add support for Keyboard.getLayoutMap() + * Add web-ui chrome://net-internals + * Allow leaving OCSP off + * Always send phased wheel events beginning with Began + * Avoid accessing profileAdapter when profile is shutting down + * Avoid unknownFunc messages in qmltests + * Blacklist CertificateError::test_error for macOS + * Blacklist NewViewRequest::test_loadNewViewRequest on macOS + * Blacklist handleError on macos until we merge the fix + * Blacklist numberOfStartedAndFinishedSignalsIsSame on b2q CIs + * Depend on QCoreApplication::startingUp() for checking + existence of app + * Do not allow WebBluetooth to continue + * Do not hide virtual keyboard if the focused node is editable + * Doc: Add a note about navigation within a page to a fragment + * Docs: Suggest to use higher DPI for printing + * Fix FilePickerController's path validation for windows and + corresponding tests + * Fix application locales again + * Fix embedded PDFs when plugins are disabled + * Fix first party url for cookie filter + * Fix inconsistent number of load signals and their order + * Fix normalization of app locales + * Fix not working certificates on mac > 10.14 + * Fix prl files on ios + * Fix qmltests::WebEngineViewNavigationHistory auto tests + * Fix qtpdf static builds on windows + * Fix static build of qml qtpdf + * Follow InProcessGpuThread::Init() on thread priority + * Generate mojo bindings before compiling extension API + registration + * Implement PluginServiceFilterQt + * Load signals test: use focusProxy for link clicking test + * Make able to override disabled features from command line + * Notify canGoBack/canGoForward changes based on web actions + * Only disconnect QWebEnginePage signals that QWebEngineView + connected + * Package devtools inspector overlay + * Remove ResourceTypeSubFrame check after website update + * Remove obsolete loadSignals test + secondLoadForError_WhenErrorPageEnabled + * Remove qquickwebengineprofile test + * Remove tracking of frame which load error page + * Remove ui/snapshot overrides for aura + * Report server directs in navigation type + * Return to using the default devtools page + * Set enumaration root directory for File.webkitRelativePath API + * Set more Display properties + * Show PDF viewer in a guest view + * Support devtools close button in QuickNanoBrowser + * Support zoom-in, zoom-out and cell web cursors on macOS + * Unblacklist and fix load signals test for file download + * Update Chromium and adapt PermissionManagerQt + * Update platform notes + * View: test signal for deletion of external page set to view +- Drop patches: + * 0001-Fix-normalization-of-app-locales.patch + * 0001-Fix-build-with-GCC-11.patch + * 0001-Fix-build-with-system-ICU-69.patch + +------------------------------------------------------------------- +Thu May 6 11:45:34 UTC 2021 - Fabian Vogt + +- Add patch to fix build with ICU 69: + * 0001-Fix-build-with-system-ICU-69.patch + +------------------------------------------------------------------- +Wed Apr 14 18:26:57 UTC 2021 - Christophe Giboudeaux + +- Add patch to fix build with GCC 11: + * 0001-Fix-build-with-GCC-11.patch + +------------------------------------------------------------------- +Wed Apr 14 16:35:17 UTC 2021 - Guillaume GARDET + +- Update _constraints to avoid OOM + +------------------------------------------------------------------- +Tue Apr 13 20:12:47 UTC 2021 - Fabian Vogt + +- Add back missing part in fix1163766.patch (boo#1184610) + +------------------------------------------------------------------- +Wed Mar 24 12:45:13 UTC 2021 - christophe@krop.fr + +- Update to version 5.15.3: + * Fix spelling and coding style + * Fix new view request handling (QTBUG-87378) + * Fix getDefaultScreenId on X11 + * Fix flaky tst_QWebEngineView::textSelectionOutOfInputField test + * Move touch input tests to separate testcase + * Add touch input tests for scrolling and pinch zooming + * Fix rare duplicate ids forming in touch point id's mapping + * Use the module's version number for QtWebEngineProcess + * Touch handling: provide id mapping without modifying TouchPoint instance + (QTBUG-88001) + * Touch handling: fix mapped ids cleanup for TouchCancel event + * et custom headers from QWebEngineUrlRequestInfo before triggering redirect + (QTBUG-88861) + * Forward modifier flags for lock keys (QTBUG-89001) + * Fix handling of more than one finger for touch event (QTBUG-86389) + * Stabilize load signals emitting (QTBUG-65223, QTBUG-87089) + * Fix building against 5.12 on most CIs + * Update minimum HarfBuzz version to 2.4.0 (QTBUG-88976) + * Fix building against Qt 5.14 + * Migrate user script IPC to mojo + * Fix crashes in user resource controller when single process + * Minor. Fix namespace for user resource controller + * Minor. RenderThreadObserverQt is really a RenderConfiguration + * Remove RenderViewObserverHelper from UserResourceController + * Cache mojo interface bindings to UserResourceControllerRenderFrame + * Cache mojo interface bindings for WebChannelIPCTransport + * Migrate render_view_observer_qt to mojo + * Fix crash on linkedin.com (QTBUG-89740) + * Suppress error pages also for http errors if they are disabled + * Fix leak in QQuickWebEngineViewPrivate::contextMenuRequested + * Register PerformanceNode early enough + * Quiet log on webrtc usage + * Remove configure option that doesn't work + * Remove Java build dependency + * Fix blank popups in qml (QTBUG-86034) + * Fix position of popup on qml (QTBUG-86034, QTBUG-89358) + * Enable hangout services extension (QTBUG-85731) + * Allow to fallback to default locale for non existent data packs (QTBUG-90490) + * Support devtools close button + * Do not extract download file names from certain url schemes (QTBUG-90355) + * Leave room for the null-termination byte when checking remote drive path + (QTBUG-90347) + * Do not set open files limit for linking if not necessary + * Remove even more remains of non network service code + * Add back prefers-color-scheme support (QTBUG-89753) + * Start supporting chrome.resourcesPrivate API (QTBUG-90035) + * Enable chrome://user-actions WebUI + * Remove remains of chrome://flash + * Fix loadFinished signal if page has content but server sends HTTP error + (QTBUG-90517) + * Fix devtools page resource loading as raw data instead of html string + * Remove frame metadata observer (RenderWidgetHostViewQt) on destroy + * Resolve installed interceptors right before interception point (QTBUG-86286) + * Update searches faster + * Remove more leftovers of the old compositor + * Enable webrtc logging and the corresponding WebUI + * Support mips64el platform CPU(loongson 3A4000) + * Add tracing UI resources + * Fix crash on meet.google.com + * Fix mad popup qquickwindows on wayland + * Fix crashes on BrowserContext destruction + * Fix crash on exit in quicknanobrowser when popup + * Remove QtPdf dependency on nss at build-time + * Avoid accessing profileAdapter when profile is shutting down (QTBUG-91187) + * Do not flush messages form profile destructor + * Ignore QQuickWebEngineNewViewRequest if it is unhandled + * Fix ScopedGLContextChecker with QTWEBENGINE_DISABLE_GPU_THREAD=1 + * Don't send duplicate load progress values + * Fix neon support in libpng + * Do not call deprecated profile interceptor on ui thread (QTBUG-86267) + * Add certificate error message for ERR_SSL_OBSOLETE_VERSION + * Fix assert in WebContentsAdapter::devToolsFrontendDestroyed + * Avoid to reject a certificate error twice in Quick + * Fix PDF viewer plugin + * FIXUP: Fix swap condition in DisplayGLOutputSurface::updatePaintNode + (QTBUG-86599) + * Fix favicon engine under device pixel scaling + * Do not pass a native keycode matching the menu key when it is remapped + (QTBUG-86672) + * Optimize WebEngineSettings::testAttribute + * Warn about QtWebengineProcess launching from network share (QTBUG-84632) + * Handle non-ascii names for pulseaudio (QTBUG-85363) + * Do not set audio device for desktop capture if audio loopback is unsupported + * Fix new view request handling (QTBUG-87378) + * Fix getDefaultScreenId on X11 + * Touch handling: provide id mapping without modifying TouchPoint instance + (QTBUG-88001) + * Set custom headers from QWebEngineUrlRequestInfo before triggering redirect + (QTBUG-88861) + * Stabilize load signals emitting (QTBUG-65223) + +- CVE fixes backported in chromium updates: + * CVE-2020-16044: Use after free in WebRTC + * CVE-2021-21118: Heap buffer overflow in Blink + * CVE-2021-21119: Use after free in Media + * CVE-2021-21120: Use after free in WebSQL + * CVE-2021-21121: Use after free in Omnibox + * CVE-2021-21122: Use after free in Blink + * CVE-2021-21123: Insufficient data validation in File System API + * CVE-2021-21125: Insufficient policy enforcement in File System API + * CVE-2021-21126: Insufficient policy enforcement in extensions + * CVE-2021-21127: Insufficient policy enforcement in extensions + * CVE-2021-21128: Heap buffer overflow in Blink + * CVE-2021-21129: Insufficient policy enforcement in File System API + * CVE-2021-21130: Insufficient policy enforcement in File System API + * CVE-2021-21131: Insufficient policy enforcement in File System API + * CVE-2021-21132: Inappropriate implementation in DevTools + * CVE-2021-21135: Inappropriate implementation in Performance API + * CVE-2021-21137: Inappropriate implementation in DevTools + * CVE-2021-21140: Uninitialized Use in USB + * CVE-2021-21141: Insufficient policy enforcement in File System API + * CVE-2021-21145: Use after free in Fonts + * CVE-2021-21146: Use after free in Navigation + * CVE-2021-21147: Inappropriate implementation in Skia + * CVE-2021-21148: Heap buffer overflow in V8 + * CVE-2021-21149: Stack overflow in Data Transfer + * CVE-2021-21150: Use after free in Downloads + * CVE-2021-21152: Heap buffer overflow in Media + * CVE-2021-21153: Stack overflow in GPU Process + * CVE-2021-21156: Heap buffer overflow in V8 + * CVE-2021-21157: Use after free in Web Sockets +- Drop obsolete patches: + * icu-68.patch + * icu-68-2.patch +- Rebase patches: + * fix1163766.patch + * sandbox-statx-futex_time64.patch + * rtc-dont-use-h264.patch + * chromium-glibc-2.33.patch +- Add patch to fix crash with certain locales: + * 0001-Fix-normalization-of-app-locales.patch +- Clean the spec file a bit + +------------------------------------------------------------------- +Wed Mar 10 16:52:28 UTC 2021 - Fabian Vogt + +- Can't use system_vpx on Leap 15.3 + +------------------------------------------------------------------- +Wed Feb 17 13:19:20 UTC 2021 - Fabian Vogt + +- Add patch to fix sandbox with glibc 2.33 on 32bit: + * sandbox-statx-futex_time64.patch + +------------------------------------------------------------------- +Tue Feb 16 09:52:13 UTC 2021 - Guillaume GARDET + +- Relax constraints for armv6 and armv7 + +------------------------------------------------------------------- +Mon Feb 15 16:28:49 UTC 2021 - Fabian Vogt + +- Add patch to fix sandbox with glibc 2.33 (boo#1182233): + * chromium-glibc-2.33.patch + +------------------------------------------------------------------- +Fri Jan 29 11:06:22 UTC 2021 - Fabian Vogt + +- Bump _constraints and %limit_build, hopefully avoid occasional + OOM and make the build quicker +- Drop obsolete conditions + +------------------------------------------------------------------- +Fri Jan 8 16:27:22 UTC 2021 - Fabian Vogt + +- Drop baselibs.conf, not needed after libksysguard5 got adjusted + +------------------------------------------------------------------- +Tue Dec 15 08:59:07 UTC 2020 - Callum Farmer + +- Fix build with ICU 68: + * Added icu-68.patch + * Added icu-68-2.patch + +------------------------------------------------------------------- +Fri Nov 20 12:10:08 UTC 2020 - Fabian Vogt + +- Update to 5.15.2: + * New bugfix release + * For more details please see: + http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.15.2/?h=5.15.2 + +------------------------------------------------------------------- +Thu Sep 10 07:57:36 UTC 2020 - Fabian Vogt + +- Update to 5.15.1: + * New bugfix release + * For more details please see: + http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.15.1/?h=5.15.1 +- Drop patches, now upstream: + * icu-v67.patch + * 0001-fix-build-after-y2038-changes-in-glibc.patch +- Refresh disable-gpu-when-using-nouveau-boo-1005323.diff +- Update rtc-dont-use-h264.patch + +------------------------------------------------------------------- +Thu May 28 10:28:37 UTC 2020 - Fabian Vogt + +- Add patch to not require openh264 and don't build the bundled version: + * rtc-dont-use-h264.patch + +------------------------------------------------------------------- +Wed May 27 08:47:23 UTC 2020 - Fabian Vogt + +- Can't use system VPX on Leap 15.2 + +------------------------------------------------------------------- +Tue May 26 11:27:19 UTC 2020 - Callum Farmer + +- Update to version 5.15.0: + * No changelog available + +------------------------------------------------------------------- +Thu May 21 10:35:41 UTC 2020 - Callum Farmer + +- Update to version 5.15.0-rc2: + * No changelog available + * Removed some-more-includes-gcc10.patch: contained in upstream + +------------------------------------------------------------------- +Wed May 6 11:43:17 UTC 2020 - Fabian Vogt + +- Update to 5.15.0-rc: + * New bugfix release + * For the changes between 5.14.2 and 5.15.0 please see: + http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.15.0/?h=5.15.0 +- Drop patches, now upstream: + * QTBUG-82186.patch + +------------------------------------------------------------------- +Fri Apr 24 10:19:13 UTC 2020 - Ismail Dönmez + +- Add icu-v67.patch to fix compilation with icu v67, this is a backport + of https://github.com/v8/v8/commit/3f8dc4b2e5baf77b463334c769af85b79d8c1463 +- Rebase icu-v67.patch on 5.15.0-beta4 + +------------------------------------------------------------------- +Fri Apr 24 07:11:42 UTC 2020 - Fabian Vogt + +- Update to 5.15.0-beta4: + * New bugfix release + * No changelog available +- Refresh QTBUG-82186.patch + +------------------------------------------------------------------- +Tue Apr 14 06:47:59 UTC 2020 - Fabian Vogt + +- Update to 5.15.0-beta3: + * New bugfix release + * No changelog available +- Refresh fix1163766.patch + +------------------------------------------------------------------- +Thu Apr 9 08:21:02 UTC 2020 - Bernhard Wiedemann + +- Add fix1163766.patch to fix opensuse-welcome on i686 (boo#1163766) + +------------------------------------------------------------------- +Mon Mar 30 13:49:40 UTC 2020 - Fabian Vogt + +- Add patch to fix build with GCC 10 (boo#1158516): + * some-more-includes-gcc10.patch + +------------------------------------------------------------------- +Tue Mar 24 12:14:06 UTC 2020 - Fabian Vogt + +- Update to 5.15.0-beta2: + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Fri Feb 28 09:59:24 UTC 2020 - Fabian Vogt + +- Update to 5.15.0-beta1: + * New bugfix release + * No changelog available +- Drop patches, now upstream: + * fix-missing-designerplugin.patch + * QTBUG-81574.patch + +------------------------------------------------------------------- +Fri Feb 21 13:36:31 UTC 2020 - Fabian Vogt + +- Fix a deadlock causing audio/video playback to fail (boo#1163744): + * QTBUG-82186.patch + +------------------------------------------------------------------- +Fri Feb 21 09:25:44 UTC 2020 - Fabian Vogt + +- Fix an issue with selections breaking replying in KMail: + * QTBUG-81574.patch + +------------------------------------------------------------------- +Wed Feb 19 10:17:00 UTC 2020 - Fabian Vogt + +- Update to 5.15.0-alpha: + * New feature release + * For more details please see: + https://wiki.qt.io/New_Features_in_Qt_5.15 +- Add patch to fix building the designer plugin: + * fix-missing-designerplugin.patch +- Move designer plugin into -devel subpackage +- Add packages for new Qt PDF module (which is technically separate + from WebEngine, but shares the source tarball) + +------------------------------------------------------------------- +Mon Jan 27 13:14:47 UTC 2020 - Fabian Vogt + +- Update to 5.14.1: + * New bugfix release + * For more details please see: + http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.14.1/?h=v5.14.1 + +------------------------------------------------------------------- +Mon Jan 20 15:00:59 UTC 2020 - Guillaume GARDET + +- Disable valgrind on %arm due to boo#1130395 + +------------------------------------------------------------------- +Thu Dec 12 12:59:01 UTC 2019 - Fabian Vogt + +- Update to 5.14.0: + * New bugfix release + * For the changes between 5.13.2 and 5.14.0 please see: + https://code.qt.io/cgit/qt/qtwebengine.git/tree/dist/changes-5.14.0?h=v5.14.0 + * For the changes between 5.13.1 and 5.13.2 please see: + https://code.qt.io/cgit/qt/qtwebengine.git/tree/dist/changes-5.13.2?h=v5.14.0 + +------------------------------------------------------------------- +Wed Dec 4 14:38:17 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-rc: + * New bugfix release + * No changelog available + * For more details please see: + * For more details about Qt 5.14 please see: + https://wiki.qt.io/New_Features_in_Qt_5.14 + +------------------------------------------------------------------- +Tue Nov 12 13:03:47 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-beta3: + * New bugfix release + * No changelog available +- Remove patches, now upstream: + * fix-system-icu.patch + +------------------------------------------------------------------- +Thu Oct 24 13:23:15 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-beta2: + * New bugfix release + * No changelog available +- Drop patch, not necessary anymore: + * harmony-fix.diff + +------------------------------------------------------------------- +Tue Oct 15 12:35:01 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-beta1: + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Mon Sep 30 13:30:50 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-alpha: + * New feature release + * No changelog available + * For more details about Qt 5.14 please see: + https://wiki.qt.io/New_Features_in_Qt_5.14 +- Drop chromium-non-void-return.patch, with newer post-build-checks + this is not necessary anymore +- Add patch to fix build with system ICU (QTBUG-78911): + * fix-system-icu.patch + +------------------------------------------------------------------- +Thu Sep 19 07:48:11 UTC 2019 - Fabian Vogt + +- Add gn_args+=link_pulseaudio=true to work around incompatibility + with PA 13 headers (QTBUG-77037) +- Enable kerberos support + +------------------------------------------------------------------- +Fri Sep 6 08:04:49 UTC 2019 - Fabian Vogt + +- Update to 5.13.1: + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.13.1/?h=v5.13.1 + +------------------------------------------------------------------- +Tue Aug 6 20:17:28 UTC 2019 - Stefan Brüns + +- Increase disk constraints to 12G, TW needs 11.7G currently + +------------------------------------------------------------------- +Fri Jul 12 07:26:17 UTC 2019 - Fabian Vogt + +- Increase assumed per-job memory use to 2.5GB + +------------------------------------------------------------------- +Thu Jul 11 07:46:30 UTC 2019 - Jiri Slaby + +- add 0001-fix-build-after-y2038-changes-in-glibc.patch + +------------------------------------------------------------------- +Wed Jun 19 11:26:34 UTC 2019 - fabian@ritter-vogt.de + +- Update to 5.13.0: + * New bugfix release + * No changelog available + * For more details about Qt 5.13 please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.13.0/?h=5.13 + +------------------------------------------------------------------- +Sat Jun 15 14:37:48 UTC 2019 - Stefan Brüns + +- Replace open coded macro for parallel build limit by the one from the + memory-constraints package + +------------------------------------------------------------------- +Tue Jun 4 07:25:38 UTC 2019 - fabian@ritter-vogt.de + +- Update to 5.13.0-rc: + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Tue Apr 30 12:50:05 UTC 2019 - Fabian Vogt + +- Fix system_vpx bcond + +------------------------------------------------------------------- +Mon Apr 29 09:17:20 UTC 2019 - fabian@ritter-vogt.de + +- Update to 5.13.0-beta2: + * New bugfix release + * No changelog available +- Refresh patches: + * harmony-fix.diff + * chromium-non-void-return.patch (sigh, again) +- Fix system_vpx bcond +- Disable using the system ICU on Leap < 16, too old + +------------------------------------------------------------------- +Thu Apr 18 07:27:59 UTC 2019 - fabian@ritter-vogt.de + +- Update to 5.12.3: + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.12.3/?h=v5.12.3 +- Refresh chromium-non-void-return.patch + +------------------------------------------------------------------- +Thu Mar 21 10:26:45 UTC 2019 - fabian@ritter-vogt.de + +- Update to 5.13.0-beta1: + * New feature release + * For more details about Qt 5.13 please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.13.0/?h=5.13 +- Refresh patches: + * disable-gpu-when-using-nouveau-boo-1005323.diff + * harmony-fix.diff + * chromium-non-void-return.patch (sigh) +- Remote patches, now upstream: + * reproducible.patch + +------------------------------------------------------------------- +Thu Mar 14 08:52:25 UTC 2019 - fabian@ritter-vogt.de + +- Update to 5.12.2: + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.12.2/?h=5.12.2 +- Remove patches, now upstream: + * cve-2019-5786.patch + +------------------------------------------------------------------- +Mon Mar 11 16:14:07 UTC 2019 - Martin Herkt <9+suse@cirno.systems> + +- Add cve-2019-5786.patch + Backport fix for CVE-2019-5786 + https://bugreports.qt.io/browse/QTBUG-74254 + +------------------------------------------------------------------- +Mon Feb 4 14:16:08 UTC 2019 - wbauer@tmo.at + +- Fix build on Leap 42.3 by adding c++14 to QT_CONFIG + +------------------------------------------------------------------- +Fri Feb 1 08:40:35 UTC 2019 - fabian@ritter-vogt.de + +- Update to 5.12.1: + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.12.1/?h=v5.12.1 +- Refresh disable-gpu-when-using-nouveau-boo-1005323.diff +- Remove patches, now upstream: + * gn-fix_arm.patch + * chromium-66.0.3359.170-gcc8-alignof.patch + +------------------------------------------------------------------- +Mon Jan 21 14:14:56 UTC 2019 - Bernhard Wiedemann + +- Add reproducible.patch to override chromium build date + to make package build reproducible (boo#1047218) +- Use openSUSE's ninja for the build so that we can apply fixes there + that are used by everyone (boo#1118619) + +------------------------------------------------------------------- +Fri Dec 21 07:34:16 UTC 2018 - Guillaume GARDET + +- Backport patch to fix %arm builds: + * gn-fix_arm.patch + +------------------------------------------------------------------- +Thu Dec 6 13:37:44 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0: + * New feature release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.12.0/?h=v5.12.0 + +------------------------------------------------------------------- +Mon Dec 3 08:17:29 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0-rc2: + * New bugfix release + * Only important bugfixes +- Changelog for Qt 5.12.0: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.12.0/?h=5.12.0 + +------------------------------------------------------------------- +Thu Nov 22 13:40:08 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0-rc: + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Thu Nov 8 15:25:48 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0-beta4: + * New bugfix release + * No changelog available +- Add yet another hunk to chromium-non-void-return.patch + +------------------------------------------------------------------- +Fri Oct 26 07:21:23 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0-beta3: + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Wed Oct 17 08:24:15 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0-beta2: + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Fri Oct 5 19:35:36 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0-beta1: + * New bugfix release + * No changelog available +- Refresh patches: + * harmony-fix.diff + * chromium-66.0.3359.170-gcc8-alignof.patch +- Replace no-return-in-nonvoid-function.diff with + with chromium-non-void-return.patch from the chromium package + +------------------------------------------------------------------- +Tue Oct 2 07:34:48 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.12.0-alpha: + * New feature release + * For more details please see: + * http://wiki.qt.io/New_Features_in_Qt_5.12 +- Refresh disable-gpu-when-using-nouveau-boo-1005323.diff +- Raise mem_per_process to 200M + +------------------------------------------------------------------- +Fri Sep 21 07:59:57 UTC 2018 - fabian@ritter-vogt.de + +- Update to 5.11.2 + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.11.2/?h=v5.11.2 +- Remove patches, now upstream: + * fix-build-with-ffmpeg4.patch + +------------------------------------------------------------------- +Tue Aug 14 09:31:03 UTC 2018 - wbauer@tmo.at + +- Use pkgconfig() notation for the libav* BuildRequires + +------------------------------------------------------------------- +Sat Jun 30 09:22:22 UTC 2018 - fabian@ritter-vogt.de + +- Enable building against the system ICU again +- Add physicalmemory >= 5GiB to _constraints in the hope to speed up + builds + +------------------------------------------------------------------- +Tue Jun 19 10:52:44 CEST 2018 - fabian@ritter-vogt.de + +- Update to 5.11.1 + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.11.1/?h=v5.11.1 +- Remove patches, now upstream: + * fix-build-with-gcc-8.patch + * fix-build-with-gcc-8-for-real.patch + * fix-build-with-opengles2.patch +- Add patch to fix build on 32-bit: + * chromium-66.0.3359.170-gcc8-alignof.patch + +------------------------------------------------------------------- +Fri Jun 8 09:16:47 UTC 2018 - guillaume.gardet@opensuse.org + +- Add a patch to fix build with opengles2 (means on ARM): + * fix-build-with-opengles2.patch + +------------------------------------------------------------------- +Thu Jun 7 07:18:15 UTC 2018 - fvogt@suse.com + +- Add yet another upstream chromium patch to fix build with GCC 8.1: + * fix-build-with-gcc-8-for-real.patch + +------------------------------------------------------------------- +Tue Jun 5 12:02:59 UTC 2018 - lbeltrame@kde.org + +- Add upstream Chromium patch to fix build with GCC 8.1: + * fix-build-with-gcc-8.patch +- Add upstream Chromium patch to fix build with ffmpeg 4: + * fix-build-with-ffmpeg4.patch +- Refresh patches: + * disable-gpu-when-using-nouveau-boo-1005323.diff + * harmony-fix.diff + +------------------------------------------------------------------- +Wed May 30 07:54:28 UTC 2018 - fabian@ritter-vogt.de + +- Fix %postun: Comment in wrong section + +------------------------------------------------------------------- +Tue May 22 16:59:28 CEST 2018 - fabian@ritter-vogt.de + +- Update to 5.11.0 + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.11.0/?h=v5.11.0 + +------------------------------------------------------------------- +Thu May 17 15:21:39 UTC 2018 - fabian@ritter-vogt.de + +- Use %autopatch +- Use %license + +------------------------------------------------------------------- +Tue May 8 11:02:00 CEST 2018 - fabian@ritter-vogt.de + +- Update to 5.11.0-rc + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Mon May 7 12:13:15 UTC 2018 - guillaume.gardet@opensuse.org + +- Fix armv6 by removing unneeded additionnal RPM_OPT_FLAGS + +------------------------------------------------------------------- +Mon Apr 23 08:59:37 CEST 2018 - fabian@ritter-vogt.de + +- Update to 5.11.0-beta4 + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Wed Apr 11 11:00:17 UTC 2018 - mliska@suse.cz + +- Add no-return-in-nonvoid-function.diff in order to fix boo#1087068. + +------------------------------------------------------------------- +Wed Apr 11 09:15:40 CEST 2018 - fabian@ritter-vogt.de + +- Update to 5.11.0-beta3 + * New bugfix release + * No changelog available +- Refresh patches: + * no-return-in-nonvoid-function.diff + +------------------------------------------------------------------- +Thu Mar 29 13:20:53 UTC 2018 - kamikazow@opensuse.org + +- Changed license header back to original template + * LGPL-2.1-or-later was wrong +- Package license is LGPL-3.0-only, GPL-2.0-only, GPL-3.0-only + * incorporates 3rd party code (Chromium, WebKit, even some dating + back to KHTML), therefore no "with-Qt-Company-Qt-exception-1.1" + because those 3rd parties never granted them. + +------------------------------------------------------------------- +Wed Mar 28 09:18:01 CEST 2018 - fabian@ritter-vogt.de + +- Update to 5.11.0-beta2 + * New bugfix release + * No changelog available +- Remove patches, now upstream: + * qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch + * qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch + +------------------------------------------------------------------- +Tue Mar 27 15:34:51 UTC 2018 - wbauer@tmo.at + +- Only automatically convert dictionaries on Leap 15 or higher, + %filetriggerin is not supported in Leap 42.3 which caused the + build to fail + +------------------------------------------------------------------- +Sun Mar 25 15:58:52 UTC 2018 - kamikazow@opensuse.org + +- Enable spell checking: + * Ported script snippet from Fedora package by Kevin Kofler + * Converts available Hunspell dictionaries locally during installation +- Changed specfile header to reflect code coming from K. Kofler + +------------------------------------------------------------------- +Fri Mar 23 08:14:18 UTC 2018 - wbauer@tmo.at + +- Also adjust the minimum versions of the private-headers-devel + subpackage's requirements + +------------------------------------------------------------------- +Thu Mar 22 22:40:32 UTC 2018 - kamikazow@opensuse.org + +- Apply a fix to make QtWE-using applications actually compile against it + +------------------------------------------------------------------- +Sun Mar 18 22:57:09 UTC 2018 - kamikazow@opensuse.org + +- Forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) + * qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch from Fedora + * qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch from Fedora + +------------------------------------------------------------------- +Tue Mar 13 13:40:53 UTC 2018 - christophe@krop.fr + +- Fix the license tag. + +------------------------------------------------------------------- +Thu Mar 1 09:56:21 CET 2018 - fabian@ritter-vogt.de + +- Update to 5.11.0-beta1 + * New feature release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.11.0-beta1/?h=v5.11.0-beta1 + +------------------------------------------------------------------- +Tue Feb 20 14:32:19 CET 2018 - fabian@ritter-vogt.de + +- Update to 5.11.0-alpha + * New feature release + * For more details please see: + * https://wiki.qt.io/New_Features_in_Qt_5.11 +- Refresh patches: + * armv6-ffmpeg-no-thumb.patch + +------------------------------------------------------------------- +Wed Feb 14 15:47:56 CET 2018 - fabian@ritter-vogt.de + +- Update to 5.10.1 + * New bugfix release + * For more details please see: + * http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.10.1/?h=v5.10.1 + +------------------------------------------------------------------- +Fri Feb 2 10:43:48 UTC 2018 - dimstar@opensuse.org + +- Eliminate build dependency on procps: we only used it to run + 'free', in order to find out how much RAM we have available. We + can get this information directly from the kernel, from + /proc/meminfo. + +------------------------------------------------------------------- +Fri Jan 12 19:10:53 UTC 2018 - fabian@ritter-vogt.de + +- Also work around crashes on wayland by disabling the GPU by default (boo#1060990): + * disable-gpu-when-using-nouveau-boo-1005323.diff + +------------------------------------------------------------------- +Fri Dec 8 23:14:38 UTC 2017 - christophe@krop.fr + +- Update the license tag (boo#967696) + +------------------------------------------------------------------- +Thu Dec 7 12:18:17 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.10.0 final + * New bugfix release + +------------------------------------------------------------------- +Sun Dec 3 14:13:03 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.10.0 RC 2 + * New bugfix release + +------------------------------------------------------------------- +Thu Nov 30 09:47:21 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.10.0 RC 1 + * New bugfix release + +------------------------------------------------------------------- +Sat Nov 25 12:46:51 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.9.3 + * New bugfix release + * For more details, see: + http://code.qt.io/cgit/qt/qtwebengine.git/tree/dist/changes-5.9.3/?h=v5.9.3 + +- Add patch to fix build on armv6: + spinlock-armv6.patch + +------------------------------------------------------------------- +Wed Nov 15 11:41:56 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.10 Beta 4 +- Contains bugfixes + +------------------------------------------------------------------- +Thu Nov 2 08:53:34 UTC 2017 - tittiatcoke@gmail.com + +- Add some feature from the Chromium builds to determine the maximum + allowed parallel processes based on the available memory. Also + ensure that the ninja build follows this maximum + +------------------------------------------------------------------- +Thu Nov 2 07:23:00 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.10 Beta 3 +- Contains bugfixes +- Refresh patches: + * armv6-ffmpeg-no-thumb.patch + * disable-gpu-when-using-nouveau-boo-1005323.diff + * harmony-fix.diff + +------------------------------------------------------------------- +Tue Oct 31 16:49:12 UTC 2017 - fabian@ritter-vogt.de + +- Restore working version of + disable-gpu-when-using-nouveau-boo-1005323.diff + +------------------------------------------------------------------- +Mon Oct 30 16:19:45 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.10 Beta 2 +- Contains bugfixes + +------------------------------------------------------------------- +Mon Oct 9 16:17:45 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.10 Beta 1 +- For more information visit: + https://blog.qt.io/blog/2017/10/09/qt-5-10-beta-released/ +- Remove patches, now upstream: + * clip-ft-glyph.diff +- Refresh patches: + * disable-gpu-when-using-nouveau-boo-1005323.diff + * harmony-fix.diff + +------------------------------------------------------------------- +Sun Oct 8 14:12:31 UTC 2017 - lbeltrame@kde.org + +- Update to 5.9.2 + * For more details please see: + https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/ +- Dropped patches, now upstream: + * clip-ft-glyph.diff + +------------------------------------------------------------------- +Tue Oct 3 02:27:41 UTC 2017 - t.zell@gmx.de + +- Fixes to make fonts readable again with FreeType 2.8.1 (boo#1061344): + * clip-ft-glyph.diff + * harmony-fix.diff + +------------------------------------------------------------------- +Tue Sep 26 15:03:00 UTC 2017 - fabian@ritter-vogt.de + +- Unbundle ffmpeg if possible, only support proprietary codecs + if the system ffmpeg does + +------------------------------------------------------------------- +Mon Sep 25 14:42:37 CEST 2017 - fabian@ritter-vogt.de + +- Update to 5.10 Alpha 1 +- For more information visit: + https://blog.qt.io/blog/2017/09/13/qt-5-10-alpha-released/ + +------------------------------------------------------------------- +Mon Jul 10 09:56:30 UTC 2017 - mlin@suse.com + +- Raise memory size to 9G and drop overwrite part of s390z build, + we didn't have build s390x at all. (bsc#1047896) +- Make it -j4 for all archtectures: do not run too many parallel that + would costs more memory. + +------------------------------------------------------------------- +Sat Jul 1 08:03:22 UTC 2017 - lbeltrame@kde.org + +- Update to 5.9.1 + * For more details please see: + http://blog.qt.io/blog/2017/06/30/qt-5-9-1-released/ +- Drop upstreamed patches: + * arm64-linux.patch + * arm64-toolchain.patch + +------------------------------------------------------------------- +Tue Jun 13 11:26:59 UTC 2017 - fvogt@suse.com + +- Backport patches to fix build on AArch64 and add workaround + (QTBUG-61128): + * arm64-linux.patch + * arm64-toolchain.patch +- Use proprietary codecs if supported by system ffmpeg (boo#1043375) + +------------------------------------------------------------------- +Thu Jun 1 07:58:09 UTC 2017 - fabian@ritter-vogt.de + +- Remove patch that is apparently not enough for aarch64: + * gn-add-aarch64.patch + +------------------------------------------------------------------- +Thu Jun 1 07:49:42 UTC 2017 - jengelh@inai.de + +- Update descriptions. +- Use find -exec's "+" strategy. + +------------------------------------------------------------------- +Wed May 31 07:05:31 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.9.0 final + +------------------------------------------------------------------- +Tue May 30 14:32:33 UTC 2017 - fabian@ritter-vogt.de + +- Disable usage of system ICU on TW as ICU 59 is not supported + and patches do not apply + +------------------------------------------------------------------- +Wed May 24 19:16:41 UTC 2017 - fabian@ritter-vogt.de + +- Update to 5.9.0 RC: + * For more details please see: + http://lists.qt-project.org/pipermail/announce/2017-May/000115.html + and https://wiki.qt.io/New_Features_in_Qt_5.9 +- Remove patches, now upstream: + * fix-chromium-gcc7.patch + * use-fno-delete-null-pointer-checks-with-gcc-6.diff + * webrtc-build-with-neon.patch +- Refresh patches: + * armv6-ffmpeg-no-thumb.patch + * disable-gpu-when-using-nouveau-boo-1005323.diff +- Support new build system, which does not support manual unbundling + anymore +- Add patch to allow building on aarch64: + * gn-add-aarch64.patch +- Reorder rpm sections + +------------------------------------------------------------------- +Mon May 15 14:07:24 UTC 2017 - fabian@ritter-vogt.de + +- Add patch to fix build with gcc 7: + * fix-chromium-gcc7.patch + +------------------------------------------------------------------- +Wed Dec 14 16:06:02 UTC 2016 - hrvoje.senjan@gmail.com + +- Update to 5.7.1 + * For more details please see: + https://blog.qt.io/blog/2016/12/14/qt-5-7-1-released/ + and https://www.qt.io/qt5-7/ +- Drop upstreamed patches: + Do-not-depend-on-Linux-4.5.patch and + detect-gcc6-use-fno-delete-null-pointer-checks.diff + +------------------------------------------------------------------- +Thu Nov 3 10:47:39 UTC 2016 - wbauer@tmo.at + +- Add -fno-delete-null-pointer-checks to CXXFLAGS instead to + really fix the gcc6 issues (boo#1003985) + +------------------------------------------------------------------- +Tue Oct 25 13:40:49 UTC 2016 - alarrosa@suse.com + +- Add disable-gpu-when-using-nouveau-boo-1005323.diff. Disables the + use of the gpu by webengine when the nouveau opengl driver is + detected since nouveau doesn't support rendering from different + threads. Also, allows to use two environment variables + QT_WEBENGINE_DISABLE_GPU to force the disabling of the gpu and + QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND to disable the detection + of nouveau, just in case someone wants to try with newer nouveau + releases (boo#1005323, boo#997171). + +------------------------------------------------------------------- +Thu Oct 6 09:26:52 UTC 2016 - hrvoje.senjan@gmail.com + +- Pass the -fno-delete-null-pointer-checks flag to avoid further + gcc6 issues + +------------------------------------------------------------------- +Wed Oct 5 09:54:47 UTC 2016 - hrvoje.senjan@gmail.com + +- Added Do-not-depend-on-Linux-4.5.patch (boo#1002873) + +------------------------------------------------------------------- +Wed Sep 28 07:32:47 UTC 2016 - schwab@suse.de + +- Ensure to build for armv6 on armv6 +- armv6-ffmpeg-no-thumb.patch: Fix ffmpeg configuration for armv6 +- webrtc-build-with-neon.patch: Properly configure webrtc for neon support + +------------------------------------------------------------------- +Sat Sep 24 18:39:10 UTC 2016 - hrvoje.senjan@gmail.com + +- Update to 5.7.0 + * For more details please see: + https://www.qt.io/qt5-7/ +- Add detect-gcc6-use-fno-delete-null-pointer-checks.diff + +------------------------------------------------------------------- +Thu Jun 23 08:10:46 UTC 2016 - lbeltrame@kde.org + +- Add use-fno-delete-null-pointer-checks-with-gcc-6.diff: fix + crashes with GCC 6 (https://codereview.qt-project.org/#/c/161965/) + +------------------------------------------------------------------- +Wed Jun 8 14:15:23 UTC 2016 - hrvoje.senjan@gmail.com + +- Update to 5.6.1 + * For more details please see: + http://blog.qt.io/blog/2016/06/08/qt-5-6-1-released/ +- Drop obsolete gcc50-fixes.diff + +------------------------------------------------------------------- +Fri Mar 18 19:03:33 UTC 2016 - hrvoje.senjan@gmail.com + +- Update to 5.6.0 + * For more details please see: + http://blog.qt.io/blog/2016/03/16/qt-5-6-released/ + and https://wiki.qt.io/New_Features_in_Qt_5.6 +- Drop upstreamed and/or obsolete patches: + gyp-arm64.patch, gyp_conf.patch, sandbox-linux-arm64.patch and + strip.diff + +------------------------------------------------------------------- +Thu Dec 3 07:24:43 UTC 2015 - mlin@suse.com + +- Do not build on s390 and s390x, chromium have not ported to them + +------------------------------------------------------------------- +Fri Oct 16 20:22:42 UTC 2015 - hrvoje.senjan@gmail.com + +- Update to 5.5.1 + * For more details please see: + http://blog.qt.io/blog/2015/10/15/qt-5-5-1-released/ + +------------------------------------------------------------------- +Wed Sep 30 08:10:19 UTC 2015 - schwab@suse.de + +- gyp-arm64.patch: Update ffmpeg config +- sandbox-linux-arm64.patch: fix chromium build for aarch64 + +------------------------------------------------------------------- +Sun Aug 16 08:32:10 UTC 2015 - hrvoje.senjan@gmail.com + +- Update to 5.5.0 + * For more details please see: + http://blog.qt.io/blog/2015/07/01/qt-5-5-released/ + and https://wiki.qt.io/New_Features_in_Qt_5.5 +- Enable jsoncpp support on Leap + +------------------------------------------------------------------- +Fri Aug 14 13:33:36 UTC 2015 - normand@linux.vnet.ibm.com + +- ExcludeArch: ppc ppc64 ppc64le + http://www.chromium.org/blink not ported to PowerPC + +------------------------------------------------------------------- +Mon Jun 29 15:23:43 UTC 2015 - schwab@suse.de + +- gyp-arm64.patch: fix support for aarch64 +- gcc50-fixes.diff: also handle gcc < 5 + +------------------------------------------------------------------- +Mon Jun 22 11:56:10 UTC 2015 - tittiatcoke@gmail.com + +- Add patch gcc50-fixes.diff to fix the detection of the GCC 5.x + compiler. Patch is equal to the one used for Chromium + +------------------------------------------------------------------- +Wed Jun 3 22:56:36 UTC 2015 - hrvoje.senjan@gmail.com + +- Update to 5.4.2 + * Bugfix release, for more details please see: + http://blog.qt.io/blog/2015/06/02/qt-5-4-2-released/ +- Use correct names in baselibs.conf + +------------------------------------------------------------------- +Wed May 27 10:24:39 UTC 2015 - aj@ajaissle.de + +- Fix summary, this is not an Qt 5 Nfc Addon + +------------------------------------------------------------------- +Tue Feb 24 16:10:33 UTC 2015 - hrvoje.senjan@gmail.com + +- Update to 5.4.1 + * For more details please see: + http://blog.qt.io/blog/2015/02/24/qt-5-4-1-released/ +- Add minimal requires on other Qt5 libraries + +------------------------------------------------------------------- +Wed Dec 10 11:00:14 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 5.4 Final + * For more details please see: + http://blog.qt.digia.com/blog/2014/12/10/qt-5-4-released/ + and http://qt-project.org/wiki/New-Features-in-Qt-5.4 + +------------------------------------------------------------------- +Thu Nov 27 15:58:50 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 5.4 RC + * For more details please see: + http://blog.qt.digia.com/blog/2014/11/27/qt-5-4-release-candidate-available/ + and http://qt-project.org/wiki/New-Features-in-Qt-5.4 + +------------------------------------------------------------------- +Sat Aug 2 15:31:16 UTC 2014 - hrvoje.senjan@gmail.com + +- Activate libqt5-qtwebengine package + diff --git a/libqt5-qtwebengine.spec b/libqt5-qtwebengine.spec new file mode 100644 index 0000000..0865992 --- /dev/null +++ b/libqt5-qtwebengine.spec @@ -0,0 +1,500 @@ +# +# spec file for package libqt5-qtwebengine +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +%ifarch %{arm} +%define _lto_cflags %{nil} +%endif + +%bcond_without system_ffmpeg +%bcond_without system_minizip +%bcond_without pipewire +# The default python version is too old on Leap 15 +%{?sle15_python_module_pythons} +%if 0%{?suse_version} == 1500 +%define pyver python311 +%else +# latest +%define pyver python3 +%endif + +# spellchecking dictionary directory +%global _qtwebengine_dictionaries_dir %{_libqt5_datadir}/qtwebengine_dictionaries + +Name: libqt5-qtwebengine +Version: 5.15.17 +Release: 0 +Summary: Qt 5 WebEngine Library +License: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +Group: Development/Libraries/X11 +URL: https://www.qt.io +%define base_name libqt5 +%define real_version 5.15.17 +%define so_version 5.15.17 +%define tar_version qtwebengine-everywhere-src-%{version} +Source: %{tar_version}.tar.xz +Source99: libqt5-qtwebengine-rpmlintrc +# PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6 +Patch0: armv6-ffmpeg-no-thumb.patch +# PATCH-FIX-OPENSUSE disable-gpu-when-using-nouveau-boo-1005323.diff +Patch1: disable-gpu-when-using-nouveau-boo-1005323.diff +# PATCH-FIX-OPENSUSE +Patch2: rtc-dont-use-h264.patch +# PATCH-FIX-UPSTREAM +Patch3: 0001-skia-Some-includes-to-fix-build-with-GCC-12.patch +# PATCH-FIX-UPSTREAM -- build with pipewire 0.3 +Patch4: qtwebengine-pipewire-0.3.patch +# PATCH-FIX-UPSTREAM -- handle futex_time64 +Patch5: sandbox_futex_time64.patch +# PATCH-FIX-UPSTREAM -- Add missing dependencies for compatibility with Ninja 1.12 +Patch6: Add-missing-dependencies.patch +# PATCH-FIX-UPSTREAM -- ICU 75 compatibility +Patch7: qt5-webengine-icu-75.patch +Patch8: 0001-Use-default-constructor-in-place-of-self-delegation-.patch +### Patch 50-99 are applied conditionally +# PATCH-FIX-OPENSUSE -- allow building qtwebengine with ffmpeg5 +Patch50: qtwebengine-ffmpeg5.patch +Patch51: qt5-webengine-ffmpeg7.patch +### +# http://www.chromium.org/blink is not ported to PowerPC & s390 +ExcludeArch: ppc ppc64 ppc64le s390 s390x +# Try to fix i586 MemoryErrors with rpmlint +#!BuildIgnore: rpmlint +BuildRequires: bison +BuildRequires: fdupes +BuildRequires: flac-devel +BuildRequires: flex +%if 0%{?suse_version} < 1550 +BuildRequires: gcc13-PIE +BuildRequires: gcc13-c++ +%endif +BuildRequires: git-core +BuildRequires: gperf +BuildRequires: krb5 +BuildRequires: krb5-devel +BuildRequires: libQt5QuickControls2-devel +BuildRequires: libcap-devel +BuildRequires: libgcrypt-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: libqt5-qtbase-private-headers-devel >= 5.12 +BuildRequires: libqt5-qtdeclarative-private-headers-devel >= 5.12 +BuildRequires: libqt5-qtlocation-private-headers-devel >= 5.12 +# For building pdf examples... +BuildRequires: libqt5-qtsvg-devel +BuildRequires: libqt5-qttools-private-headers-devel >= 5.12 +BuildRequires: libqt5-qtwebchannel-private-headers-devel >= 5.12 +BuildRequires: libqt5-qtxmlpatterns-private-headers-devel >= 5.12 +BuildRequires: memory-constraints +BuildRequires: ninja +BuildRequires: nodejs-default +BuildRequires: pam-devel +BuildRequires: pciutils-devel +BuildRequires: perl +BuildRequires: perl-JSON +%if %{with pipewire} +BuildRequires: pipewire-devel +%endif +BuildRequires: pkgconfig +BuildRequires: %{pyver} +BuildRequires: %{pyver}-devel +BuildRequires: %{pyver}-html5lib +BuildRequires: %{pyver}-xml +BuildRequires: re2c +BuildRequires: sed +BuildRequires: snappy-devel +BuildRequires: update-desktop-files +BuildRequires: usbutils +BuildRequires: util-linux +%ifnarch %{arm} +BuildRequires: valgrind-devel +%endif +BuildRequires: wdiff +BuildRequires: xz +BuildRequires: yasm +BuildRequires: yasm-devel +BuildRequires: perl(Switch) +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(atk) +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) >= 2.4.2 +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(glib-2.0) >= 2.32 +BuildRequires: pkgconfig(glproto) +BuildRequires: pkgconfig(gmodule-2.0) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gthread-2.0) +BuildRequires: pkgconfig(harfbuzz) >= 2.4.0 +BuildRequires: pkgconfig(icu-i18n) >= 65.0 +BuildRequires: pkgconfig(icu-uc) >= 65.0 +BuildRequires: pkgconfig(jsoncpp) +BuildRequires: pkgconfig(lcms2) +%if %{with system_ffmpeg} +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) +%endif +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libevent) +BuildRequires: pkgconfig(libexif) +BuildRequires: pkgconfig(libmtp) +BuildRequires: pkgconfig(libpci) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(libxslt) +%if %{with system_minizip} +BuildRequires: pkgconfig(minizip) +%endif +BuildRequires: pkgconfig(nspr) +BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(opus) +BuildRequires: pkgconfig(pangocairo) +BuildRequires: pkgconfig(pangoft2) +BuildRequires: pkgconfig(poppler-cpp) +BuildRequires: pkgconfig(protobuf) +BuildRequires: pkgconfig(speex) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(vpx) >= 1.8.0 +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xcomposite) +BuildRequires: pkgconfig(xcursor) +BuildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xi) +BuildRequires: pkgconfig(xkbfile) +BuildRequires: pkgconfig(xrandr) +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(xscrnsaver) +BuildRequires: pkgconfig(xt) +BuildRequires: pkgconfig(xtst) +BuildRequires: pkgconfig(zlib) +BuildRequires: yasm-devel +Provides: bundled(libsrtp2) = 2.2.0~pre +%requires_ge libQt5Network5 +%requires_ge libQtQuick5 +%requires_ge libQt5Widgets5 + +%description +Qt WebEngine provides functionality for rendering regions of dynamic +web content. + +The functionality in Qt WebEngine is divided into the following +modules: + +* QtWebEngineCore: Provides public API shared by both QtWebEngine and + QtWebEngineWidgets +* QtWebEngine: Provides QML types for rendering web content within a + QML application +* QtWebEngineWidgets: Provides a web browser engine as well as C++ + classes to render and interact with web content + +%package devel +Summary: Development files for the Qt5 WebEngine library +Group: Development/Libraries/X11 +Requires: %{name} = %{version} + +%description devel +You need this package if you want to compile programs with Qt WebEngine. + +%package private-headers-devel +Summary: Non-ABI stable experimental API for the Qt5 WebEngine library +Group: Development/Libraries/C and C++ +Requires: %{name}-devel = %{version} +%requires_ge libqt5-qtbase-private-headers-devel +%requires_ge libqt5-qtdeclarative-private-headers-devel +BuildArch: noarch + +%description private-headers-devel +This package provides private headers of libqt5-qtwebengine that are normally +not used by application development and that do not have any ABI or +API guarantees. The packages that build against these have to require +the exact Qt version. + +%package examples +Summary: Qt5 WebEngine examples +Group: Development/Libraries/X11 +Requires: libqt5-qtquickcontrols2 +Recommends: %{name}-devel + +%description examples +Examples for the libqt5-qtwebengine module. + +%package -n libQt5Pdf5 +Summary: Qt5 PDF library +Group: Development/Libraries/X11 + +%description -n libQt5Pdf5 +Main library of the Qt PDF module. + +%package -n libQt5PdfWidgets5 +Summary: Qt5 PDF library for Qt Widgets +Group: Development/Libraries/X11 + +%description -n libQt5PdfWidgets5 +Library of the Qt PDF module with support for Qt Widgets. + +%package -n libqt5-qtpdf-imports +Summary: Qt5 PDF module for QML +Group: Development/Libraries/X11 + +%description -n libqt5-qtpdf-imports +Qt Quick module for the Qt PDF library. + +%package -n libqt5-qtpdf-devel +Summary: Development files for the Qt5 PDF library +Group: Development/Libraries/X11 +Requires: libQt5Pdf5 = %{version} +Requires: libQt5PdfWidgets5 = %{version} + +%description -n libqt5-qtpdf-devel +You need this package if you want to compile programs with Qt PDF. + +%package -n libqt5-qtpdf-private-headers-devel +Summary: Non-ABI stable experimental API for the Qt5 PDF library +Group: Development/Libraries/C and C++ +Requires: libqt5-qtpdf-devel = %{version} +%requires_ge libqt5-qtbase-private-headers-devel +BuildArch: noarch + +%description -n libqt5-qtpdf-private-headers-devel +This package provides private headers of libqt5-qtpdf that are normally +not used by application development and that do not have any ABI or +API guarantees. The packages that build against these have to require +the exact Qt version. + +%package -n libqt5-qtpdf-examples +Summary: Qt5 PDF examples +Group: Development/Libraries/X11 +Recommends: libqt5-qtpdf-devel + +%description -n libqt5-qtpdf-examples +Examples for the libqt5-qtpdf module. + +%prep +# Leap's rpm doesn't understand '%%autopatch -M N' nor '%%autopatch X Y Z -p1' +%setup -q -n %{tar_version} +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 +%patch -P7 -p1 +%patch -P8 -p1 + +# FFmpeg 5 +%if %{with system_ffmpeg} +%if %{pkg_vcmp pkgconfig(libavcodec) >= 5} +%patch -P50 -p1 +%patch -P51 -p1 +%endif +%endif + +sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro + +#force the configure script to generate the forwarding headers (it checks whether .git directory exists) +mkdir .git + +# QTBUG-61128 +sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ + src/3rdparty/chromium/build/toolchain/linux/BUILD.gn + +rm -r src/3rdparty/chromium/third_party/openh264/src +rm -r src/3rdparty/chromium/third_party/unrar + +%build +%if 0%{?suse_version} < 1550 +export CC=gcc-13 CXX=g++-13 +%endif + +%ifnarch x86_64 +RPM_OPT_FLAGS="$RPM_OPT_FLAGS " +export RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-g / } +%endif +# Upstream does not care about those warnings, but optflags has -Werror=return-type. +export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wno-return-type" +# It does not actually include proprietary codecs, it only makes it attempt to use ffmpeg +# Link pulseaudio to work around QTBUG-77037 +%qmake5 QMAKE_CFLAGS="$RPM_OPT_FLAGS" \ + QMAKE_CXXFLAGS="$RPM_OPT_FLAGS" \ + QMAKE_LFLAGS+="-Wl,--no-keep-memory -Wl,--hash-size=31 -Wl,--reduce-memory-overheads" \ + gn_args+="link_pulseaudio=true" \ + gn_args+="media_use_openh264=false" \ + gn_args+="use_system_libxml=true use_system_libxslt=true" \ +%if "%{pyver}" == "python311" + config.input.python_override=python3.11 \ +%endif +%if 0%{?suse_version} < 1550 + QMAKE_CC=gcc-13 \ + QMAKE_CXX=g++-13 \ + QMAKE_LINK=g++-13 \ +%endif + qtwebengine.pro -- \ + -webengine-alsa \ + -no-webengine-embedded-build \ + -webengine-kerberos \ + -system-webengine-icu \ + -system-webengine-opus \ + -system-webengine-webp \ + -webengine-pepper-plugins \ + -webengine-printing-and-pdf \ +%if %{with system_ffmpeg} + -system-webengine-ffmpeg \ + -webengine-proprietary-codecs \ +%endif +%if %{with pipewire} + -webengine-webrtc-pipewire \ +%endif +%if 0%{?suse_version} > 1500 + -webengine-python-version python3 +%endif + +# Determine the right number of parallel processes based on the available memory +%limit_build -m 2750 + +# Ensure that also the internal chromium build follows the right number of parallel +# processes instead of its defaults. +export NINJAFLAGS="%{?_smp_mflags}" + +# Warning: Don't use %%make_build or the chromium build log won't be available +make %{_smp_mflags} VERBOSE=1 + +%install +%qmake5_install + +find %{buildroot}%{_libdir} -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} + +find %{buildroot}%{_libdir} -type f -name '*pc' -print -exec perl -pi -e "s, -L$RPM_BUILD_DIR/?\S+,,g" {} + -exec sed -i -e "s,^moc_location=.*,moc_location=%libqt5_bindir/moc," -e "s,uic_location=.*,uic_location=%libqt5_bindir/uic," {} + +find %{buildroot}%{_libdir} -type f -name '*pc' -exec sed -i -e "/^RPM_BUILD_DIR/d" {} + +sed -i '/^Libs.private/d' %{buildroot}%{_libdir}/pkgconfig/Qt*Web*.pc + +# kill .la files +rm -f %{buildroot}%{_libqt5_libdir}/*.la + +# Workaround to allow using QtWE with older Qt versions +%global qtcore_version %(printf %{pkg_version libQt5Core5} | cut -d + -f 1) +# NOTE the space after '%%{version}' is important to only match '5.15.X ${_Qt5XXX_FIND_VERSION_EXACT}' +sed -i 's#%{version} #%{qtcore_version} #' %{buildroot}%{_libqt5_libdir}/cmake/*/*Config.cmake + +# Hunspell dictionaries will be converted and put here on package installation +mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} + +%if %{pkg_vcmp libQt5Core5 >= 5.15} +# CMake files for plugins are only useful for static builds +rm -r %{buildroot}%{_libqt5_libdir}/cmake/Qt5Gui +%endif + +%ldconfig_scriptlets +%ldconfig_scriptlets -n libQt5Pdf5 +%ldconfig_scriptlets -n libQt5PdfWidgets5 + +%filetriggerin -- %{_datadir}/hunspell +# Convert Hunspell dictionaries on package installation +while read filename ; do + case "$filename" in + *.dic) + bdicname=%{_qtwebengine_dictionaries_dir}/`basename -s .dic "$filename"`.bdic + %{_libqt5_bindir}/qwebengine_convert_dict "$filename" "$bdicname" &> /dev/null || : + ;; + esac +done + +%files +%license LICENSE.* +%dir %{_datadir}/qt5/ +%dir %{_qtwebengine_dictionaries_dir} +%dir %{_datadir}/qt5/resources/ +%{_datadir}/qt5/resources/qtwebengine_* +%dir %{_datadir}/qt5/translations/ +%{_datadir}/qt5/translations/qtwebengine_locales/ +%{_libqt5_archdatadir}/qml/QtWebEngine/ +%{_libqt5_bindir}/qwebengine_convert_dict +%{_libqt5_libdir}/libQt5WebEngine.so.* +%{_libqt5_libdir}/libQt5WebEngineCore.so.* +%{_libqt5_libdir}/libQt5WebEngineWidgets.so.* +%dir %{_libqt5_libexecdir} +%{_libqt5_libexecdir}/QtWebEngineProcess + +%files private-headers-devel +%license LICENSE.* +%{_libqt5_includedir}/QtWebEngine*/%{so_version} + +%files devel +%exclude %{_libqt5_includedir}/QtWebEngine*/%{so_version} +%{_libqt5_includedir}/QtWebEngine*/ +%dir %{_libqt5_libdir}/cmake/Qt5Designer/ +%{_libqt5_libdir}/cmake/Qt5Designer/Qt5Designer_QWebEngineViewPlugin.cmake +%{_libqt5_libdir}/cmake/Qt5WebEngine*/ +%{_libqt5_libdir}/libQt5WebEngine*.prl +%{_libqt5_libdir}/libQt5WebEngine*.so +%{_libqt5_libdir}/pkgconfig/Qt5WebEngine*.pc +%{_libqt5_libdir}/qt5/mkspecs/modules/qt_lib_webengine*.pri +%dir %{_libqt5_plugindir}/designer/ +%{_libqt5_plugindir}/designer/libqwebengineview.so + +%files examples +%license LICENSE.* +%dir %{_libqt5_examplesdir} +%{_libqt5_examplesdir}/webengine*/ + +%files -n libQt5Pdf5 +%license LICENSE.* +%{_libqt5_archdatadir}/plugins/imageformats/libqpdf.so +%{_libqt5_libdir}/libQt5Pdf.so.* + +%files -n libQt5PdfWidgets5 +%license LICENSE.* +%{_libqt5_libdir}/libQt5PdfWidgets.so.* + +%files -n libqt5-qtpdf-imports +%license LICENSE.* +%{_libqt5_archdatadir}/qml/QtQuick/Pdf/ + +%files -n libqt5-qtpdf-private-headers-devel +%license LICENSE.* +%{_libqt5_includedir}/QtPdf/%{so_version} +%{_libqt5_includedir}/QtPdfWidgets/%{so_version} + +%files -n libqt5-qtpdf-devel +%license LICENSE.* +%exclude %{_libqt5_includedir}/QtPdf*/%{so_version} +%{_libqt5_includedir}/QtPdf/ +%{_libqt5_includedir}/QtPdfWidgets/ +%{_libqt5_libdir}/cmake/Qt5Pdf/ +%{_libqt5_libdir}/cmake/Qt5PdfWidgets/ +%{_libqt5_libdir}/libQt5Pdf.prl +%{_libqt5_libdir}/libQt5Pdf.so +%{_libqt5_libdir}/libQt5PdfWidgets.prl +%{_libqt5_libdir}/libQt5PdfWidgets.so +%{_libqt5_libdir}/pkgconfig/Qt5Pdf.pc +%{_libqt5_libdir}/pkgconfig/Qt5PdfWidgets.pc +%{_libqt5_libdir}/qt5/mkspecs/modules/qt_lib_pdf*.pri + +%files -n libqt5-qtpdf-examples +%license LICENSE.* +%dir %{_libqt5_examplesdir} +%{_libqt5_examplesdir}/pdf*/ + +%changelog diff --git a/qt5-webengine-ffmpeg7.patch b/qt5-webengine-ffmpeg7.patch new file mode 100644 index 0000000..2fd3e74 --- /dev/null +++ b/qt5-webengine-ffmpeg7.patch @@ -0,0 +1,493 @@ +From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001 +From: Dale Curtis +Date: Sat, 2 Apr 2022 05:13:53 +0000 +Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125 + commits) + +https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526 + +Created with: + roll-dep src/third_party/ffmpeg + +Fixed: 1293918 +Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng +Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647 +Auto-Submit: Dale Curtis +Reviewed-by: Dan Sanders +Commit-Queue: Dale Curtis +Cr-Commit-Position: refs/heads/main@{#988253} +--- + .../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++--------- + media/ffmpeg/ffmpeg_common.cc | 11 +++---- + media/filters/audio_file_reader.cc | 9 +++--- + media/filters/audio_file_reader_unittest.cc | 6 ++-- + .../filters/audio_video_metadata_extractor.cc | 11 +++++-- + .../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++-- + ...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +- + media/filters/ffmpeg_audio_decoder.cc | 13 +++++---- + 8 files changed, 51 insertions(+), 37 deletions(-) + +diff --git a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc +index a043005..9ae2ca9 100644 +--- a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc +@@ -73,7 +73,7 @@ void CdmAudioDecoderConfigToAVCodecContext( + codec_context->sample_fmt = AV_SAMPLE_FMT_NONE; + } + +- codec_context->channels = config.channel_count; ++ codec_context->ch_layout.nb_channels = config.channel_count; + codec_context->sample_rate = config.samples_per_second; + + if (config.extra_data) { +@@ -123,8 +123,8 @@ void CopySamples(cdm::AudioFormat cdm_format, + case cdm::kAudioFormatPlanarS16: + case cdm::kAudioFormatPlanarF32: { + const int decoded_size_per_channel = +- decoded_audio_size / av_frame.channels; +- for (int i = 0; i < av_frame.channels; ++i) { ++ decoded_audio_size / av_frame.ch_layout.nb_channels; ++ for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) { + memcpy(output_buffer, av_frame.extended_data[i], + decoded_size_per_channel); + output_buffer += decoded_size_per_channel; +@@ -184,13 +184,14 @@ bool FFmpegCdmAudioDecoder::Initialize( + // Success! + decoding_loop_.reset(new FFmpegDecodingLoop(codec_context_.get())); + samples_per_second_ = config.samples_per_second; +- bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8; ++ bytes_per_frame_ = ++ codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8; + output_timestamp_helper_.reset( + new AudioTimestampHelper(config.samples_per_second)); + is_initialized_ = true; + + // Store initial values to guard against midstream configuration changes. +- channels_ = codec_context_->channels; ++ channels_ = codec_context_->ch_layout.nb_channels; + av_sample_format_ = codec_context_->sample_fmt; + + return true; +@@ -290,17 +291,18 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer( + for (auto& frame : audio_frames) { + int decoded_audio_size = 0; + if (frame->sample_rate != samples_per_second_ || +- frame->channels != channels_ || frame->format != av_sample_format_) { ++ frame->ch_layout.nb_channels != channels_ || ++ frame->format != av_sample_format_) { + DLOG(ERROR) << "Unsupported midstream configuration change!" + << " Sample Rate: " << frame->sample_rate << " vs " +- << samples_per_second_ << ", Channels: " << frame->channels ++ << samples_per_second_ << ", Channels: " << frame->ch_layout.nb_channels + << " vs " << channels_ << ", Sample Format: " << frame->format + << " vs " << av_sample_format_; + return cdm::kDecodeError; + } + + decoded_audio_size = av_samples_get_buffer_size( +- nullptr, codec_context_->channels, frame->nb_samples, ++ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples, + codec_context_->sample_fmt, 1); + if (!decoded_audio_size) + continue; +@@ -319,7 +321,7 @@ bool FFmpegCdmAudioDecoder::OnNewFrame( + size_t* total_size, + std::vector>* audio_frames, + AVFrame* frame) { +- *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels, ++ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->ch_layout.nb_channels, + frame->nb_samples, + codec_context_->sample_fmt, 1); + audio_frames->emplace_back(av_frame_clone(frame)); +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +index c17dd9f..0448cb5 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -341,10 +341,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + codec_context->sample_fmt, codec_context->codec_id); + + ChannelLayout channel_layout = +- codec_context->channels > 8 ++ codec_context->ch_layout.nb_channels > 8 + ? CHANNEL_LAYOUT_DISCRETE +- : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, +- codec_context->channels); ++ : ChannelLayoutToChromeChannelLayout( ++ codec_context->ch_layout.u.mask, ++ codec_context->ch_layout.nb_channels); + + int sample_rate = codec_context->sample_rate; + switch (codec) { +@@ -397,7 +398,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + extra_data, encryption_scheme, seek_preroll, + codec_context->delay); + if (channel_layout == CHANNEL_LAYOUT_DISCRETE) +- config->SetChannelsForDiscrete(codec_context->channels); ++ config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels); + + #if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO) + // These are bitstream formats unknown to ffmpeg, so they don't have +@@ -462,7 +463,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config, + + // TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses + // said information to decode. +- codec_context->channels = config.channels(); ++ codec_context->ch_layout.nb_channels = config.channels(); + codec_context->sample_rate = config.samples_per_second(); + + if (config.extra_data().empty()) { +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index bd73908..745c4c7 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -112,14 +112,15 @@ bool AudioFileReader::OpenDecoder() { + + // Verify the channel layout is supported by Chrome. Acts as a sanity check + // against invalid files. See http://crbug.com/171962 +- if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout, +- codec_context_->channels) == ++ if (ChannelLayoutToChromeChannelLayout( ++ codec_context_->ch_layout.u.mask, ++ codec_context_->ch_layout.nb_channels) == + CHANNEL_LAYOUT_UNSUPPORTED) { + return false; + } + + // Store initial values to guard against midstream configuration changes. +- channels_ = codec_context_->channels; ++ channels_ = codec_context_->ch_layout.nb_channels; + audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id); + sample_rate_ = codec_context_->sample_rate; + av_sample_format_ = codec_context_->sample_fmt; +@@ -222,7 +223,7 @@ bool AudioFileReader::OnNewFrame( + if (frames_read < 0) + return false; + +- const int channels = frame->channels; ++ const int channels = frame->ch_layout.nb_channels; + if (frame->sample_rate != sample_rate_ || channels != channels_ || + frame->format != av_sample_format_) { + DLOG(ERROR) << "Unsupported midstream configuration change!" +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +index 6f231c8..ca5e5fb 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +@@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { + if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id || + audio_profile_ != stream_codec_parameters_->profile || + sample_rate_index_ != sample_rate_index || +- channel_configuration_ != stream_codec_parameters_->channels || ++ channel_configuration_ != ++ stream_codec_parameters_->ch_layout.nb_channels || + frame_length_ != header_plus_packet_size) { + header_generated_ = + GenerateAdtsHeader(stream_codec_parameters_->codec_id, + 0, // layer + stream_codec_parameters_->profile, sample_rate_index, + 0, // private stream +- stream_codec_parameters_->channels, ++ stream_codec_parameters_->ch_layout.nb_channels, + 0, // originality + 0, // home + 0, // copyrighted_stream +@@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { + codec_ = stream_codec_parameters_->codec_id; + audio_profile_ = stream_codec_parameters_->profile; + sample_rate_index_ = sample_rate_index; +- channel_configuration_ = stream_codec_parameters_->channels; ++ channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels; + frame_length_ = header_plus_packet_size; + } + +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +index ac8bb13..3e4e3f6 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +@@ -29,7 +29,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test { + memset(&test_parameters_, 0, sizeof(AVCodecParameters)); + test_parameters_.codec_id = AV_CODEC_ID_AAC; + test_parameters_.profile = FF_PROFILE_AAC_MAIN; +- test_parameters_.channels = 2; ++ test_parameters_.ch_layout.nb_channels = 2; + test_parameters_.extradata = extradata_header_; + test_parameters_.extradata_size = sizeof(extradata_header_); + } +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +index 72fac61..ab49fd5 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -27,7 +27,7 @@ namespace media { + + // Return the number of channels from the data in |frame|. + static inline int DetermineChannels(AVFrame* frame) { +- return frame->channels; ++ return frame->ch_layout.nb_channels; + } + + // Called by FFmpeg's allocation routine to allocate a buffer. Uses +@@ -227,7 +227,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer, + // Translate unsupported into discrete layouts for discrete configurations; + // ffmpeg does not have a labeled discrete configuration internally. + ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout( +- codec_context_->channel_layout, codec_context_->channels); ++ codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels); + if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED && + config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) { + channel_layout = CHANNEL_LAYOUT_DISCRETE; +@@ -344,11 +344,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) { + // Success! + av_sample_format_ = codec_context_->sample_fmt; + +- if (codec_context_->channels != config.channels()) { ++ if (codec_context_->ch_layout.nb_channels != config.channels()) { + MEDIA_LOG(ERROR, media_log_) + << "Audio configuration specified " << config.channels() + << " channels, but FFmpeg thinks the file contains " +- << codec_context_->channels << " channels"; ++ << codec_context_->ch_layout.nb_channels << " channels"; + ReleaseFFmpegResources(); + state_ = kUninitialized; + return false; +@@ -398,7 +398,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, + if (frame->nb_samples <= 0) + return AVERROR(EINVAL); + +- if (s->channels != channels) { ++ if (s->ch_layout.nb_channels != channels) { + DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count."; + return AVERROR(EINVAL); + } +@@ -431,7 +431,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, + ChannelLayout channel_layout = + config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE + ? CHANNEL_LAYOUT_DISCRETE +- : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels); ++ : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask, ++ s->ch_layout.nb_channels); + + if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) { + DLOG(ERROR) << "Unsupported channel layout."; +commit 62274859104bd828373ae406aa9309e610449ac5 +Author: Ted Meyer +Date: Fri Mar 22 19:56:55 2024 +0000 + + Replace deprecated use of AVCodecContext::reordered_opaque + + We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context + now to trigger timestamp propagation. + + Bug: 330573128 + Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858 + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308 + Commit-Queue: Ted (Chromium) Meyer + Reviewed-by: Dan Sanders + Cr-Commit-Position: refs/heads/main@{#1277051} + +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +index 0448cb5..89e9cf9 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -414,7 +414,9 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + #if BUILDFLAG(USE_PROPRIETARY_CODECS) + // TODO(dalecurtis): Just use the profile from the codec context if ffmpeg + // ever starts supporting xHE-AAC. +- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN) { ++ constexpr uint8_t kXHEAAc = 41; ++ if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN || ++ codec_context->profile == kXHEAAc) { + // Errors aren't fatal here, so just drop any MediaLog messages. + NullMediaLog media_log; + mp4::AAC aac_parser; +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc +index ebd1bab..04d5ecc 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc +@@ -86,16 +86,16 @@ FFMPEG_TEST_CASE(Cr47761, "crbug47761.ogg", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr50045, "crbug50045.mp4", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr62127, "crbug62127.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr93620, "security/93620.ogg", PIPELINE_OK, PIPELINE_OK); +-FFMPEG_TEST_CASE(Cr100492, +- "security/100492.webm", +- DECODER_ERROR_NOT_SUPPORTED, +- DECODER_ERROR_NOT_SUPPORTED); ++FFMPEG_TEST_CASE(Cr100492, "security/100492.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr100543, "security/100543.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr101458, + "security/101458.webm", + PIPELINE_ERROR_DECODE, + PIPELINE_ERROR_DECODE); +-FFMPEG_TEST_CASE(Cr108416, "security/108416.webm", PIPELINE_OK, PIPELINE_OK); ++FFMPEG_TEST_CASE(Cr108416, ++ "security/108416.webm", ++ PIPELINE_ERROR_DECODE, ++ PIPELINE_ERROR_DECODE); + FFMPEG_TEST_CASE(Cr110849, + "security/110849.mkv", + DEMUXER_ERROR_COULD_NOT_OPEN, +@@ -150,7 +150,10 @@ FFMPEG_TEST_CASE(Cr234630b, + "security/234630b.mov", + DEMUXER_ERROR_NO_SUPPORTED_STREAMS, + DEMUXER_ERROR_NO_SUPPORTED_STREAMS); +-FFMPEG_TEST_CASE(Cr242786, "security/242786.webm", PIPELINE_OK, PIPELINE_OK); ++FFMPEG_TEST_CASE(Cr242786, ++ "security/242786.webm", ++ PIPELINE_OK, ++ PIPELINE_ERROR_DECODE); + // Test for out-of-bounds access with slightly corrupt file (detection logic + // thinks it's a MONO file, but actually contains STEREO audio). + FFMPEG_TEST_CASE(Cr275590, +@@ -371,8 +374,8 @@ FFMPEG_TEST_CASE(WEBM_2, + DEMUXER_ERROR_NO_SUPPORTED_STREAMS); + FFMPEG_TEST_CASE(WEBM_4, + "security/out.webm.68798.1929", +- DECODER_ERROR_NOT_SUPPORTED, +- DECODER_ERROR_NOT_SUPPORTED); ++ PIPELINE_OK, ++ PIPELINE_OK); + FFMPEG_TEST_CASE(WEBM_5, "frame_size_change.webm", PIPELINE_OK, PIPELINE_OK); + + // General MKV test cases. +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index 745c4c7..2b3abba 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -242,10 +242,10 @@ bool AudioFileReader::OnNewFrame( + // silence from being output. In the case where we are also discarding some + // portion of the packet (as indicated by a negative pts), we further want to + // adjust the duration downward by however much exists before zero. +- if (audio_codec_ == kCodecAAC && frame->pkt_duration) { ++ if (audio_codec_ == kCodecAAC && frame->duration) { + const base::TimeDelta pkt_duration = ConvertFromTimeBase( + glue_->format_context()->streams[stream_index_]->time_base, +- frame->pkt_duration + std::min(static_cast(0), frame->pts)); ++ frame->duration + std::min(static_cast(0), frame->pts)); + const base::TimeDelta frame_duration = base::TimeDelta::FromSecondsD( + frames_read / static_cast(sample_rate_)); + +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +index 7996606..a15aafc 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -86,7 +86,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) { + } + + FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log) +- : media_log_(media_log), state_(kUninitialized), decode_nalus_(false) { ++ : media_log_(media_log), state_(kUninitialized), decode_nalus_(false), timestamp_map_(128) { + DVLOG(1) << __func__; + thread_checker_.DetachFromThread(); + } +@@ -183,7 +183,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context, + frame->width = coded_size.width(); + frame->height = coded_size.height(); + frame->format = codec_context->pix_fmt; +- frame->reordered_opaque = codec_context->reordered_opaque; + + // Now create an AVBufferRef for the data just allocated. It will own the + // reference to the VideoFrame object. +@@ -318,8 +317,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) { + DCHECK(packet.data); + DCHECK_GT(packet.size, 0); + +- // Let FFmpeg handle presentation timestamp reordering. +- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds(); ++ const int64_t timestamp = buffer.timestamp().InMicroseconds(); ++ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId(); ++ timestamp_map_.Put(timestamp_id, timestamp); ++ packet.opaque = reinterpret_cast(timestamp_id.GetUnsafeValue()); + } + + switch (decoding_loop_->DecodePacket( +@@ -358,8 +359,13 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) { + + scoped_refptr video_frame = + reinterpret_cast(av_buffer_get_opaque(frame->buf[0])); ++ const auto ts_id = TimestampId(reinterpret_cast(frame->opaque)); ++ const auto ts_lookup = timestamp_map_.Get(ts_id); ++ if (ts_lookup == timestamp_map_.end()) { ++ return false; ++ } + video_frame->set_timestamp( +- base::TimeDelta::FromMicroseconds(frame->reordered_opaque)); ++ base::TimeDelta::FromMicroseconds(std::get<1>(*ts_lookup))); + video_frame->metadata()->power_efficient = false; + output_cb_.Run(video_frame); + return true; +@@ -385,8 +391,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, + codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config); + codec_context_->thread_type = + FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); ++ + codec_context_->opaque = this; + codec_context_->get_buffer2 = GetVideoBufferImpl; ++ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE; + + if (decode_nalus_) + codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h +index f13ce41..ee2444b 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h +@@ -8,6 +8,8 @@ + #include + #include + ++#include "base/containers/mru_cache.h" ++#include "base/util/type_safety/id_type.h" + #include "base/callback.h" + #include "base/macros.h" + #include "base/memory/ref_counted.h" +@@ -85,6 +87,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { + // FFmpeg structures owned by this object. + std::unique_ptr codec_context_; + ++ // The gist here is that timestamps need to be 64 bits to store microsecond ++ // precision. A 32 bit integer would overflow at ~35 minutes at this level of ++ // precision. We can't cast the timestamp to the void ptr object used by the ++ // opaque field in ffmpeg then, because it would lose data on a 32 bit build. ++ // However, we don't actually have 2^31 timestamped frames in a single ++ // playback, so it's fine to use the 32 bit value as a key in a map which ++ // contains the actual timestamps. Additionally, we've in the past set 128 ++ // outstanding frames for re-ordering as a limit for cross-thread decoding ++ // tasks, so we'll do that here too with the LRU cache. ++ using TimestampId = util::IdType; ++ ++ TimestampId::Generator timestamp_id_generator_; ++ base::MRUCache timestamp_map_; ++ + VideoDecoderConfig config_; + + VideoFramePool frame_pool_; +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +index d12fade..8abfbbf 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +@@ -114,7 +114,6 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context, + int total_size = y_size + 2 * uv_size; + + av_frame->format = context->pix_fmt; +- av_frame->reordered_opaque = context->reordered_opaque; + + // Set |av_frame| members as required by FFmpeg. + av_frame->data[kYPlaneIndex] = frame_buffer->MutableDataY(); +@@ -273,8 +272,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, + return WEBRTC_VIDEO_CODEC_ERROR; + } + packet.size = static_cast(input_image.size()); +- int64_t frame_timestamp_us = input_image.ntp_time_ms_ * 1000; // ms -> μs +- av_context_->reordered_opaque = frame_timestamp_us; + + int result = avcodec_send_packet(av_context_.get(), &packet); + if (result < 0) { +@@ -290,10 +287,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, + return WEBRTC_VIDEO_CODEC_ERROR; + } + +- // We don't expect reordering. Decoded frame tamestamp should match +- // the input one. +- RTC_DCHECK_EQ(av_frame_->reordered_opaque, frame_timestamp_us); +- + absl::optional qp; + // TODO(sakal): Maybe it is possible to get QP directly from FFmpeg. + h264_bitstream_parser_.ParseBitstream(input_image.data(), input_image.size()); diff --git a/qt5-webengine-icu-75.patch b/qt5-webengine-icu-75.patch new file mode 100644 index 0000000..66c74f5 --- /dev/null +++ b/qt5-webengine-icu-75.patch @@ -0,0 +1,102 @@ +Fix build with ICU 75. +Origin: Arch linux: https://gitlab.archlinux.org/archlinux/packaging/packages/qt5-webengine/-/blob/main/qt5-webengine-icu-75.patch?ref_type=heads + +diff --git a/src/3rdparty/chromium/build/config/compiler/BUILD.gn b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +index b511a58c5a8..abd78a74ead 100644 +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -566,7 +566,7 @@ config("compiler") { + # Override Chromium's default for projects that wish to stay on C++11. + cflags_cc += [ "-std=${standard_prefix}++11" ] + } else { +- cflags_cc += [ "-std=${standard_prefix}++14" ] ++ cflags_cc += [ "-std=${standard_prefix}++17" ] + } + } else if (!is_win && !is_nacl) { + if (target_os == "android") { +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +index f03ba1e4ab4..b1495f7ae74 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() { + // + // __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all + // platforms, as Chrome's requirement is C++14 as of 2020. +-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__) ++#if 0 + static constexpr size_t kAlignment = + std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__); + #else +diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h +index 76e627d27a3..942435f44a0 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h ++++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_SPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h +index d6c31b06887..d8852dfd186 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h ++++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_PPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h +index 3b9971abae1..d4458038527 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "absl/types/optional.h" + #include "api/array_view.h" +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h +index 345e45ce127..e686e5d691a 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h +@@ -12,6 +12,7 @@ + #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + + #include ++#include + + #include "absl/types/optional.h" + +diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +index 8fcc799b795..bc69ddcf18c 100644 +--- a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +@@ -15,6 +15,7 @@ + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h" + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h" + #include "third_party/blink/renderer/platform/text/text_boundaries.h" ++#include "absl/base/attributes.h" + + namespace blink { + +diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h +index df506f0fae6..1de105fed4a 100644 +--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h ++++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h +@@ -180,7 +180,7 @@ + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. + +-#define ABSL_OPTION_USE_STD_VARIANT 2 ++#define ABSL_OPTION_USE_STD_VARIANT 0 + + + // ABSL_OPTION_USE_INLINE_NAMESPACE diff --git a/qtwebengine-everywhere-src-5.15.17.tar.xz b/qtwebengine-everywhere-src-5.15.17.tar.xz new file mode 100644 index 0000000..933c23b --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.17.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50e53dd294e9d37c91ff78084b860a65bc64e9def69f8e2082a276598e4679b0 +size 322689280 diff --git a/qtwebengine-ffmpeg5.patch b/qtwebengine-ffmpeg5.patch new file mode 100644 index 0000000..6fc3c8e --- /dev/null +++ b/qtwebengine-ffmpeg5.patch @@ -0,0 +1,153 @@ +Allow building qtwebengine using ffmpeg 5 +Origin: ArchLinux, https://github.com/archlinux/svntogit-packages/tree/packages/qt5-webengine/trunk + +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h +index 2734a48..70b1877 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h +@@ -29,6 +29,7 @@ extern "C" { + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index cb81d92..bd73908 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDemuxer() { + } + + bool AudioFileReader::OpenDecoder() { +- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (codec) { + // MP3 decodes to S16P which we don't support, tell it to use S16 instead. + if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P) +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +index 0d825ed..72fac61 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) { + } + } + +- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (!codec || + avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) { + DLOG(ERROR) << "Could not initialize audio decoder: " +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc +index d34db63..427565b 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc +@@ -98,12 +98,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) { + + // Next try to use the first DTS value, for codecs where we know PTS == DTS + // (excludes all H26x codecs). The start time must be returned in PTS. +- if (stream->first_dts != kNoFFmpegTimestamp && ++ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && + stream->codecpar->codec_id != AV_CODEC_ID_HEVC && + stream->codecpar->codec_id != AV_CODEC_ID_H264 && + stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { + const base::TimeDelta first_pts = +- ConvertFromTimeBase(stream->time_base, stream->first_dts); ++ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); + if (first_pts < start_time) + start_time = first_pts; + } +@@ -408,11 +408,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { + scoped_refptr buffer; + + if (type() == DemuxerStream::TEXT) { +- int id_size = 0; ++ size_t id_size = 0; + uint8_t* id_data = av_packet_get_side_data( + packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size); + +- int settings_size = 0; ++ size_t settings_size = 0; + uint8_t* settings_data = av_packet_get_side_data( + packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size); + +@@ -424,7 +424,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { + buffer = DecoderBuffer::CopyFrom(packet->data, packet->size, + side_data.data(), side_data.size()); + } else { +- int side_data_size = 0; ++ size_t side_data_size = 0; + uint8_t* side_data = av_packet_get_side_data( + packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); + +@@ -485,7 +485,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { + packet->size - data_offset); + } + +- int skip_samples_size = 0; ++ size_t skip_samples_size = 0; + const uint32_t* skip_samples_ptr = + reinterpret_cast(av_packet_get_side_data( + packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size)); +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc +index 0ef3521..8483ecc 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc +@@ -59,7 +59,6 @@ static int64_t AVIOSeekOperation(void* opaque, int64_t offset, int whence) { + } + + void FFmpegGlue::InitializeFFmpeg() { +- av_register_all(); + } + + static void LogContainer(bool is_local_file, +@@ -95,9 +94,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) { + // Enable fast, but inaccurate seeks for MP3. + format_context_->flags |= AVFMT_FLAG_FAST_SEEK; + +- // Ensures we can read out various metadata bits like vp8 alpha. +- format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA; +- + // Ensures format parsing errors will bail out. From an audit on 11/2017, all + // instances were real failures. Solves bugs like http://crbug.com/710791. + format_context_->error_recognition |= AV_EF_EXPLODE; +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +index ef12477..7996606 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, + if (decode_nalus_) + codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; + +- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { + ReleaseFFmpegResources(); + return false; +diff --git a/src/3rdparty/chromium/media/filters/media_file_checker.cc b/src/3rdparty/chromium/media/filters/media_file_checker.cc +index 59c2a2f..1a9872c 100644 +--- a/src/3rdparty/chromium/media/filters/media_file_checker.cc ++++ b/src/3rdparty/chromium/media/filters/media_file_checker.cc +@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_time) { + auto context = AVStreamToAVCodecContext(format_context->streams[i]); + if (!context) + continue; +- AVCodec* codec = avcodec_find_decoder(cp->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(cp->codec_id); + if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) { + auto loop = std::make_unique(context.get()); + stream_contexts[i] = {std::move(context), std::move(loop)}; +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +index 9002b87..d12fade 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings, + // a pointer |this|. + av_context_->opaque = this; + +- AVCodec* codec = avcodec_find_decoder(av_context_->codec_id); ++ const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id); + if (!codec) { + // This is an indication that FFmpeg has not been initialized or it has not + // been compiled/initialized with the correct set of codecs. diff --git a/qtwebengine-pipewire-0.3.patch b/qtwebengine-pipewire-0.3.patch new file mode 100644 index 0000000..5cb5c66 --- /dev/null +++ b/qtwebengine-pipewire-0.3.patch @@ -0,0 +1,1764 @@ +Fix build with pipewire 0.3 +Origin: ArchLinux, https://github.com/archlinux/svntogit-packages/tree/packages/qt5-webengine/trunk + +--- + .../webrtc/modules/desktop_capture/BUILD.gn | 42 +- + .../linux/base_capturer_pipewire.cc | 770 ++++++++++++++---- + .../linux/base_capturer_pipewire.h | 58 +- + .../linux/{pipewire.sigs => pipewire02.sigs} | 3 + + .../desktop_capture/linux/pipewire03.sigs | 46 ++ + .../linux/screen_capturer_pipewire.cc | 29 - + .../linux/screen_capturer_pipewire.h | 33 - + .../linux/window_capturer_pipewire.cc | 29 - + .../linux/window_capturer_pipewire.h | 33 - + .../desktop_capture/screen_capturer_linux.cc | 4 +- + .../desktop_capture/window_capturer_linux.cc | 4 +- + .../chromium/third_party/webrtc/webrtc.gni | 4 + + 12 files changed, 750 insertions(+), 305 deletions(-) + rename src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/{pipewire.sigs => pipewire02.sigs} (91%) + create mode 100644 src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire03.sigs + delete mode 100644 src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc + delete mode 100644 src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.h + delete mode 100644 src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc + delete mode 100644 src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.h + +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn +index 5235512..8259442 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn +@@ -11,6 +11,11 @@ import("//build/config/ui.gni") + import("//tools/generate_stubs/rules.gni") + import("../../webrtc.gni") + ++if (rtc_use_pipewire) { ++ assert(rtc_pipewire_version == "0.2" || rtc_pipewire_version == "0.3", ++ "Unsupported PipeWire version") ++} ++ + use_desktop_capture_differ_sse2 = current_cpu == "x86" || current_cpu == "x64" + + config("x11_config") { +@@ -200,22 +205,41 @@ if (is_linux || is_chromeos) { + ] + } + +- if (rtc_link_pipewire) { ++ if (rtc_pipewire_version == "0.3") { + pkg_config("pipewire") { +- packages = [ "libpipewire-0.2" ] ++ packages = [ "libpipewire-0.3" ] ++ if (!rtc_link_pipewire) { ++ ignore_libs = true ++ } + } + } else { ++ pkg_config("pipewire") { ++ packages = [ "libpipewire-0.2" ] ++ if (!rtc_link_pipewire) { ++ ignore_libs = true ++ } ++ } ++ } ++ ++ if (!rtc_link_pipewire) { + # When libpipewire is not directly linked, use stubs to allow for dlopening of + # the binary. + generate_stubs("pipewire_stubs") { +- configs = [ "../../:common_config" ] ++ configs = [ ++ "../../:common_config", ++ ":pipewire", ++ ] + deps = [ "../../rtc_base" ] + extra_header = "linux/pipewire_stub_header.fragment" + logging_function = "RTC_LOG(LS_VERBOSE)" + logging_include = "rtc_base/logging.h" + output_name = "linux/pipewire_stubs" + path_from_source = "modules/desktop_capture/linux" +- sigs = [ "linux/pipewire.sigs" ] ++ if (rtc_pipewire_version == "0.3") { ++ sigs = [ "linux/pipewire03.sigs" ] ++ } else { ++ sigs = [ "linux/pipewire02.sigs" ] ++ } + } + } + +@@ -506,6 +530,7 @@ rtc_library("desktop_capture_generic") { + absl_deps = [ + "//third_party/abseil-cpp/absl/memory", + "//third_party/abseil-cpp/absl/strings", ++ "//third_party/abseil-cpp/absl/types:optional", + ] + + if (rtc_use_x11_extensions) { +@@ -526,20 +551,15 @@ rtc_library("desktop_capture_generic") { + sources += [ + "linux/base_capturer_pipewire.cc", + "linux/base_capturer_pipewire.h", +- "linux/screen_capturer_pipewire.cc", +- "linux/screen_capturer_pipewire.h", +- "linux/window_capturer_pipewire.cc", +- "linux/window_capturer_pipewire.h", + ] + + configs += [ + ":pipewire_config", + ":gio", ++ ":pipewire", + ] + +- if (rtc_link_pipewire) { +- configs += [ ":pipewire" ] +- } else { ++ if (!rtc_link_pipewire) { + deps += [ ":pipewire_stubs" ] + } + } +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc +index 2640e93..c302a08 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc +@@ -14,8 +14,14 @@ + #include + #include + #include ++#if !PW_CHECK_VERSION(0, 3, 0) + #include + #include ++#endif ++ ++#include ++#include ++#include + + #include + #include +@@ -30,7 +36,11 @@ + #include "modules/desktop_capture/linux/pipewire_stubs.h" + + using modules_desktop_capture_linux::InitializeStubs; +-using modules_desktop_capture_linux::kModulePipewire; ++#if PW_CHECK_VERSION(0, 3, 0) ++using modules_desktop_capture_linux::kModulePipewire03; ++#else ++using modules_desktop_capture_linux::kModulePipewire02; ++#endif + using modules_desktop_capture_linux::StubPathMap; + #endif // defined(WEBRTC_DLOPEN_PIPEWIRE) + +@@ -47,9 +57,156 @@ const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast"; + const int kBytesPerPixel = 4; + + #if defined(WEBRTC_DLOPEN_PIPEWIRE) ++#if PW_CHECK_VERSION(0, 3, 0) ++const char kPipeWireLib[] = "libpipewire-0.3.so.0"; ++#else + const char kPipeWireLib[] = "libpipewire-0.2.so.1"; + #endif ++#endif + ++// static ++struct dma_buf_sync { ++ uint64_t flags; ++}; ++#define DMA_BUF_SYNC_READ (1 << 0) ++#define DMA_BUF_SYNC_START (0 << 2) ++#define DMA_BUF_SYNC_END (1 << 2) ++#define DMA_BUF_BASE 'b' ++#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) ++ ++static void SyncDmaBuf(int fd, uint64_t start_or_end) { ++ struct dma_buf_sync sync = {0}; ++ ++ sync.flags = start_or_end | DMA_BUF_SYNC_READ; ++ ++ while (true) { ++ int ret; ++ ret = ioctl(fd, DMA_BUF_IOCTL_SYNC, &sync); ++ if (ret == -1 && errno == EINTR) { ++ continue; ++ } else if (ret == -1) { ++ RTC_LOG(LS_ERROR) << "Failed to synchronize DMA buffer: " ++ << g_strerror(errno); ++ break; ++ } else { ++ break; ++ } ++ } ++} ++ ++class ScopedBuf { ++ public: ++ ScopedBuf() {} ++ ScopedBuf(unsigned char* map, int map_size, bool is_dma_buf, int fd) ++ : map_(map), map_size_(map_size), is_dma_buf_(is_dma_buf), fd_(fd) {} ++ ~ScopedBuf() { ++ if (map_ != MAP_FAILED) { ++ if (is_dma_buf_) { ++ SyncDmaBuf(fd_, DMA_BUF_SYNC_END); ++ } ++ munmap(map_, map_size_); ++ } ++ } ++ ++ operator bool() { return map_ != MAP_FAILED; } ++ ++ void initialize(unsigned char* map, int map_size, bool is_dma_buf, int fd) { ++ map_ = map; ++ map_size_ = map_size; ++ is_dma_buf_ = is_dma_buf; ++ fd_ = fd; ++ } ++ ++ unsigned char* get() { return map_; } ++ ++ protected: ++ unsigned char* map_ = nullptr; ++ int map_size_; ++ bool is_dma_buf_; ++ int fd_; ++}; ++ ++template ++class Scoped { ++ public: ++ Scoped() {} ++ explicit Scoped(T* val) { ptr_ = val; } ++ ~Scoped() { RTC_NOTREACHED(); } ++ ++ T* operator->() { return ptr_; } ++ ++ bool operator!() { return ptr_ == nullptr; } ++ ++ T* get() { return ptr_; } ++ ++ T** receive() { ++ RTC_CHECK(!ptr_); ++ return &ptr_; ++ } ++ ++ Scoped& operator=(T* val) { ++ ptr_ = val; ++ return *this; ++ } ++ ++ protected: ++ T* ptr_ = nullptr; ++}; ++ ++template <> ++Scoped::~Scoped() { ++ if (ptr_) { ++ g_error_free(ptr_); ++ } ++} ++ ++template <> ++Scoped::~Scoped() { ++ if (ptr_) { ++ g_free(ptr_); ++ } ++} ++ ++template <> ++Scoped::~Scoped() { ++ if (ptr_) { ++ g_variant_unref(ptr_); ++ } ++} ++ ++template <> ++Scoped::~Scoped() { ++ if (ptr_) { ++ g_variant_iter_free(ptr_); ++ } ++} ++ ++template <> ++Scoped::~Scoped() { ++ if (ptr_) { ++ g_object_unref(ptr_); ++ } ++} ++ ++template <> ++Scoped::~Scoped() { ++ if (ptr_) { ++ g_object_unref(ptr_); ++ } ++} ++ ++#if PW_CHECK_VERSION(0, 3, 0) ++void BaseCapturerPipeWire::OnCoreError(void* data, ++ uint32_t id, ++ int seq, ++ int res, ++ const char* message) { ++ BaseCapturerPipeWire* that = static_cast(data); ++ RTC_DCHECK(that); ++ ++ RTC_LOG(LS_ERROR) << "PipeWire remote error: " << message; ++} ++#else + // static + void BaseCapturerPipeWire::OnStateChanged(void* data, + pw_remote_state old_state, +@@ -64,7 +221,7 @@ void BaseCapturerPipeWire::OnStateChanged(void* data, + break; + case PW_REMOTE_STATE_CONNECTED: + RTC_LOG(LS_INFO) << "PipeWire remote state: connected."; +- that->CreateReceivingStream(); ++ that->pw_stream_ = that->CreateReceivingStream(); + break; + case PW_REMOTE_STATE_CONNECTING: + RTC_LOG(LS_INFO) << "PipeWire remote state: connecting."; +@@ -74,6 +231,7 @@ void BaseCapturerPipeWire::OnStateChanged(void* data, + break; + } + } ++#endif + + // static + void BaseCapturerPipeWire::OnStreamStateChanged(void* data, +@@ -83,6 +241,18 @@ void BaseCapturerPipeWire::OnStreamStateChanged(void* data, + BaseCapturerPipeWire* that = static_cast(data); + RTC_DCHECK(that); + ++#if PW_CHECK_VERSION(0, 3, 0) ++ switch (state) { ++ case PW_STREAM_STATE_ERROR: ++ RTC_LOG(LS_ERROR) << "PipeWire stream state error: " << error_message; ++ break; ++ case PW_STREAM_STATE_PAUSED: ++ case PW_STREAM_STATE_STREAMING: ++ case PW_STREAM_STATE_UNCONNECTED: ++ case PW_STREAM_STATE_CONNECTING: ++ break; ++ } ++#else + switch (state) { + case PW_STREAM_STATE_ERROR: + RTC_LOG(LS_ERROR) << "PipeWire stream state error: " << error_message; +@@ -97,36 +267,74 @@ void BaseCapturerPipeWire::OnStreamStateChanged(void* data, + case PW_STREAM_STATE_STREAMING: + break; + } ++#endif + } + + // static ++#if PW_CHECK_VERSION(0, 3, 0) ++void BaseCapturerPipeWire::OnStreamParamChanged(void* data, ++ uint32_t id, ++ const struct spa_pod* format) { ++#else + void BaseCapturerPipeWire::OnStreamFormatChanged(void* data, + const struct spa_pod* format) { ++#endif + BaseCapturerPipeWire* that = static_cast(data); + RTC_DCHECK(that); + + RTC_LOG(LS_INFO) << "PipeWire stream format changed."; + ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (!format || id != SPA_PARAM_Format) { ++#else + if (!format) { + pw_stream_finish_format(that->pw_stream_, /*res=*/0, /*params=*/nullptr, + /*n_params=*/0); ++#endif + return; + } + ++#if PW_CHECK_VERSION(0, 3, 0) ++ spa_format_video_raw_parse(format, &that->spa_video_format_); ++#else + that->spa_video_format_ = new spa_video_info_raw(); + spa_format_video_raw_parse(format, that->spa_video_format_, + &that->pw_type_->format_video); ++#endif + ++#if PW_CHECK_VERSION(0, 3, 0) ++ auto width = that->spa_video_format_.size.width; ++ auto height = that->spa_video_format_.size.height; ++#else + auto width = that->spa_video_format_->size.width; + auto height = that->spa_video_format_->size.height; ++#endif + auto stride = SPA_ROUND_UP_N(width * kBytesPerPixel, 4); + auto size = height * stride; + ++ that->desktop_size_ = DesktopSize(width, height); ++ + uint8_t buffer[1024] = {}; + auto builder = spa_pod_builder{buffer, sizeof(buffer)}; + + // Setup buffers and meta header for new format. +- const struct spa_pod* params[2]; ++ const struct spa_pod* params[3]; ++#if PW_CHECK_VERSION(0, 3, 0) ++ params[0] = reinterpret_cast(spa_pod_builder_add_object( ++ &builder, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers, ++ SPA_PARAM_BUFFERS_size, SPA_POD_Int(size), SPA_PARAM_BUFFERS_stride, ++ SPA_POD_Int(stride), SPA_PARAM_BUFFERS_buffers, ++ SPA_POD_CHOICE_RANGE_Int(8, 1, 32))); ++ params[1] = reinterpret_cast(spa_pod_builder_add_object( ++ &builder, SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta, SPA_PARAM_META_type, ++ SPA_POD_Id(SPA_META_Header), SPA_PARAM_META_size, ++ SPA_POD_Int(sizeof(struct spa_meta_header)))); ++ params[2] = reinterpret_cast(spa_pod_builder_add_object( ++ &builder, SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta, SPA_PARAM_META_type, ++ SPA_POD_Id(SPA_META_VideoCrop), SPA_PARAM_META_size, ++ SPA_POD_Int(sizeof(struct spa_meta_region)))); ++ pw_stream_update_params(that->pw_stream_, params, 3); ++#else + params[0] = reinterpret_cast(spa_pod_builder_object( + &builder, + // id to enumerate buffer requirements +@@ -155,8 +363,18 @@ void BaseCapturerPipeWire::OnStreamFormatChanged(void* data, + // Size: size of the metadata, specified as integer (i) + ":", that->pw_core_type_->param_meta.size, "i", + sizeof(struct spa_meta_header))); +- +- pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/2); ++ params[2] = reinterpret_cast(spa_pod_builder_object( ++ &builder, ++ // id to enumerate supported metadata ++ that->pw_core_type_->param.idMeta, that->pw_core_type_->param_meta.Meta, ++ // Type: specified as id or enum (I) ++ ":", that->pw_core_type_->param_meta.type, "I", ++ that->pw_core_type_->meta.VideoCrop, ++ // Size: size of the metadata, specified as integer (i) ++ ":", that->pw_core_type_->param_meta.size, "i", ++ sizeof(struct spa_meta_video_crop))); ++ pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/3); ++#endif + } + + // static +@@ -164,15 +382,26 @@ void BaseCapturerPipeWire::OnStreamProcess(void* data) { + BaseCapturerPipeWire* that = static_cast(data); + RTC_DCHECK(that); + +- pw_buffer* buf = nullptr; ++ struct pw_buffer* next_buffer; ++ struct pw_buffer* buffer = nullptr; ++ ++ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_); ++ while (next_buffer) { ++ buffer = next_buffer; ++ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_); + +- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) { ++ if (next_buffer) { ++ pw_stream_queue_buffer(that->pw_stream_, buffer); ++ } ++ } ++ ++ if (!buffer) { + return; + } + +- that->HandleBuffer(buf); ++ that->HandleBuffer(buffer); + +- pw_stream_queue_buffer(that->pw_stream_, buf); ++ pw_stream_queue_buffer(that->pw_stream_, buffer); + } + + BaseCapturerPipeWire::BaseCapturerPipeWire(CaptureSourceType source_type) +@@ -183,6 +412,7 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() { + pw_thread_loop_stop(pw_main_loop_); + } + ++#if !PW_CHECK_VERSION(0, 3, 0) + if (pw_type_) { + delete pw_type_; + } +@@ -190,30 +420,41 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() { + if (spa_video_format_) { + delete spa_video_format_; + } ++#endif + + if (pw_stream_) { + pw_stream_destroy(pw_stream_); + } + ++#if !PW_CHECK_VERSION(0, 3, 0) + if (pw_remote_) { + pw_remote_destroy(pw_remote_); + } ++#endif + ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (pw_core_) { ++ pw_core_disconnect(pw_core_); ++ } ++ ++ if (pw_context_) { ++ pw_context_destroy(pw_context_); ++ } ++#else + if (pw_core_) { + pw_core_destroy(pw_core_); + } ++#endif + + if (pw_main_loop_) { + pw_thread_loop_destroy(pw_main_loop_); + } + ++#if !PW_CHECK_VERSION(0, 3, 0) + if (pw_loop_) { + pw_loop_destroy(pw_loop_); + } +- +- if (current_frame_) { +- free(current_frame_); +- } ++#endif + + if (start_request_signal_id_) { + g_dbus_connection_signal_unsubscribe(connection_, start_request_signal_id_); +@@ -228,18 +469,16 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() { + } + + if (session_handle_) { +- GDBusMessage* message = g_dbus_message_new_method_call( +- kDesktopBusName, session_handle_, kSessionInterfaceName, "Close"); +- if (message) { +- GError* error = nullptr; +- g_dbus_connection_send_message(connection_, message, ++ Scoped message(g_dbus_message_new_method_call( ++ kDesktopBusName, session_handle_, kSessionInterfaceName, "Close")); ++ if (message.get()) { ++ Scoped error; ++ g_dbus_connection_send_message(connection_, message.get(), + G_DBUS_SEND_MESSAGE_FLAGS_NONE, +- /*out_serial=*/nullptr, &error); +- if (error) { ++ /*out_serial=*/nullptr, error.receive()); ++ if (error.get()) { + RTC_LOG(LS_ERROR) << "Failed to close the session: " << error->message; +- g_error_free(error); + } +- g_object_unref(message); + } + } + +@@ -274,7 +513,11 @@ void BaseCapturerPipeWire::InitPipeWire() { + StubPathMap paths; + + // Check if the PipeWire library is available. +- paths[kModulePipewire].push_back(kPipeWireLib); ++#if PW_CHECK_VERSION(0, 3, 0) ++ paths[kModulePipewire03].push_back(kPipeWireLib); ++#else ++ paths[kModulePipewire02].push_back(kPipeWireLib); ++#endif + if (!InitializeStubs(paths)) { + RTC_LOG(LS_ERROR) << "Failed to load the PipeWire library and symbols."; + portal_init_failed_ = true; +@@ -284,16 +527,46 @@ void BaseCapturerPipeWire::InitPipeWire() { + + pw_init(/*argc=*/nullptr, /*argc=*/nullptr); + ++#if PW_CHECK_VERSION(0, 3, 0) ++ pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); ++ ++ pw_thread_loop_lock(pw_main_loop_); ++ ++ pw_context_ = ++ pw_context_new(pw_thread_loop_get_loop(pw_main_loop_), nullptr, 0); ++ if (!pw_context_) { ++ RTC_LOG(LS_ERROR) << "Failed to create PipeWire context"; ++ return; ++ } ++ ++ pw_core_ = pw_context_connect(pw_context_, nullptr, 0); ++ if (!pw_core_) { ++ RTC_LOG(LS_ERROR) << "Failed to connect PipeWire context"; ++ return; ++ } ++#else + pw_loop_ = pw_loop_new(/*properties=*/nullptr); + pw_main_loop_ = pw_thread_loop_new(pw_loop_, "pipewire-main-loop"); + ++ pw_thread_loop_lock(pw_main_loop_); ++ + pw_core_ = pw_core_new(pw_loop_, /*properties=*/nullptr); + pw_core_type_ = pw_core_get_type(pw_core_); + pw_remote_ = pw_remote_new(pw_core_, nullptr, /*user_data_size=*/0); + + InitPipeWireTypes(); ++#endif + + // Initialize event handlers, remote end and stream-related. ++#if PW_CHECK_VERSION(0, 3, 0) ++ pw_core_events_.version = PW_VERSION_CORE_EVENTS; ++ pw_core_events_.error = &OnCoreError; ++ ++ pw_stream_events_.version = PW_VERSION_STREAM_EVENTS; ++ pw_stream_events_.state_changed = &OnStreamStateChanged; ++ pw_stream_events_.param_changed = &OnStreamParamChanged; ++ pw_stream_events_.process = &OnStreamProcess; ++#else + pw_remote_events_.version = PW_VERSION_REMOTE_EVENTS; + pw_remote_events_.state_changed = &OnStateChanged; + +@@ -301,19 +574,33 @@ void BaseCapturerPipeWire::InitPipeWire() { + pw_stream_events_.state_changed = &OnStreamStateChanged; + pw_stream_events_.format_changed = &OnStreamFormatChanged; + pw_stream_events_.process = &OnStreamProcess; ++#endif + ++#if PW_CHECK_VERSION(0, 3, 0) ++ pw_core_add_listener(pw_core_, &spa_core_listener_, &pw_core_events_, this); ++ ++ pw_stream_ = CreateReceivingStream(); ++ if (!pw_stream_) { ++ RTC_LOG(LS_ERROR) << "Failed to create PipeWire stream"; ++ return; ++ } ++#else + pw_remote_add_listener(pw_remote_, &spa_remote_listener_, &pw_remote_events_, + this); + pw_remote_connect_fd(pw_remote_, pw_fd_); ++#endif + + if (pw_thread_loop_start(pw_main_loop_) < 0) { + RTC_LOG(LS_ERROR) << "Failed to start main PipeWire loop"; + portal_init_failed_ = true; + } + ++ pw_thread_loop_unlock(pw_main_loop_); ++ + RTC_LOG(LS_INFO) << "PipeWire remote opened."; + } + ++#if !PW_CHECK_VERSION(0, 3, 0) + void BaseCapturerPipeWire::InitPipeWireTypes() { + spa_type_map* map = pw_core_type_->map; + pw_type_ = new PipeWireType(); +@@ -323,23 +610,44 @@ void BaseCapturerPipeWire::InitPipeWireTypes() { + spa_type_format_video_map(map, &pw_type_->format_video); + spa_type_video_format_map(map, &pw_type_->video_format); + } ++#endif + +-void BaseCapturerPipeWire::CreateReceivingStream() { ++pw_stream* BaseCapturerPipeWire::CreateReceivingStream() { ++#if !PW_CHECK_VERSION(0, 3, 0) ++ if (pw_remote_get_state(pw_remote_, nullptr) != PW_REMOTE_STATE_CONNECTED) { ++ RTC_LOG(LS_ERROR) << "Cannot create pipewire stream"; ++ return nullptr; ++ } ++#endif + spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1}; +- spa_rectangle pwScreenBounds = +- spa_rectangle{static_cast(desktop_size_.width()), +- static_cast(desktop_size_.height())}; +- +- spa_fraction pwFrameRateMin = spa_fraction{0, 1}; +- spa_fraction pwFrameRateMax = spa_fraction{60, 1}; ++ spa_rectangle pwMaxScreenBounds = spa_rectangle{UINT32_MAX, UINT32_MAX}; + + pw_properties* reuseProps = + pw_properties_new_string("pipewire.client.reuse=1"); +- pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps); ++#if PW_CHECK_VERSION(0, 3, 0) ++ auto stream = pw_stream_new(pw_core_, "webrtc-consume-stream", reuseProps); ++#else ++ auto stream = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps); ++#endif + + uint8_t buffer[1024] = {}; + const spa_pod* params[1]; + spa_pod_builder builder = spa_pod_builder{buffer, sizeof(buffer)}; ++ ++#if PW_CHECK_VERSION(0, 3, 0) ++ params[0] = reinterpret_cast(spa_pod_builder_add_object( ++ &builder, SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat, ++ SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_video), ++ SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw), ++ SPA_FORMAT_VIDEO_format, ++ SPA_POD_CHOICE_ENUM_Id(5, SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_RGBx, ++ SPA_VIDEO_FORMAT_RGBA, SPA_VIDEO_FORMAT_BGRx, ++ SPA_VIDEO_FORMAT_BGRA), ++ SPA_FORMAT_VIDEO_size, ++ SPA_POD_CHOICE_RANGE_Rectangle(&pwMinScreenBounds, &pwMinScreenBounds, ++ &pwMaxScreenBounds), ++ 0)); ++#else + params[0] = reinterpret_cast(spa_pod_builder_object( + &builder, + // id to enumerate formats +@@ -349,69 +657,218 @@ void BaseCapturerPipeWire::CreateReceivingStream() { + // then allowed formats are enumerated (e) and the format is undecided (u) + // to allow negotiation + ":", pw_type_->format_video.format, "Ieu", pw_type_->video_format.BGRx, +- SPA_POD_PROP_ENUM(2, pw_type_->video_format.RGBx, +- pw_type_->video_format.BGRx), ++ SPA_POD_PROP_ENUM( ++ 4, pw_type_->video_format.RGBx, pw_type_->video_format.BGRx, ++ pw_type_->video_format.RGBA, pw_type_->video_format.BGRA), + // Video size: specified as rectangle (R), preferred size is specified as + // first parameter, then allowed size is defined as range (r) from min and + // max values and the format is undecided (u) to allow negotiation +- ":", pw_type_->format_video.size, "Rru", &pwScreenBounds, 2, +- &pwMinScreenBounds, &pwScreenBounds, +- // Frame rate: specified as fraction (F) and set to minimum frame rate +- // value +- ":", pw_type_->format_video.framerate, "F", &pwFrameRateMin, +- // Max frame rate: specified as fraction (F), preferred frame rate is set +- // to maximum value, then allowed frame rate is defined as range (r) from +- // min and max values and it is undecided (u) to allow negotiation +- ":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2, +- &pwFrameRateMin, &pwFrameRateMax)); +- +- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_, ++ ":", pw_type_->format_video.size, "Rru", &pwMinScreenBounds, ++ SPA_POD_PROP_MIN_MAX(&pwMinScreenBounds, &pwMaxScreenBounds))); ++#endif ++ ++ pw_stream_add_listener(stream, &spa_stream_listener_, &pw_stream_events_, + this); ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (pw_stream_connect(stream, PW_DIRECTION_INPUT, pw_stream_node_id_, ++ PW_STREAM_FLAG_AUTOCONNECT, params, 1) != 0) { ++#else + pw_stream_flags flags = static_cast( +- PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE | +- PW_STREAM_FLAG_MAP_BUFFERS); +- if (pw_stream_connect(pw_stream_, PW_DIRECTION_INPUT, /*port_path=*/nullptr, ++ PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE); ++ if (pw_stream_connect(stream, PW_DIRECTION_INPUT, /*port_path=*/nullptr, + flags, params, + /*n_params=*/1) != 0) { ++#endif + RTC_LOG(LS_ERROR) << "Could not connect receiving stream."; + portal_init_failed_ = true; +- return; ++ return nullptr; + } ++ ++ return stream; + } + + void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) { + spa_buffer* spaBuffer = buffer->buffer; +- void* src = nullptr; ++ ScopedBuf map; ++ uint8_t* src = nullptr; ++ ++ if (spaBuffer->datas[0].chunk->size == 0) { ++ RTC_LOG(LS_ERROR) << "Failed to get video stream: Zero size."; ++ return; ++ } ++ ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (spaBuffer->datas[0].type == SPA_DATA_MemFd || ++ spaBuffer->datas[0].type == SPA_DATA_DmaBuf) { ++#else ++ if (spaBuffer->datas[0].type == pw_core_type_->data.MemFd || ++ spaBuffer->datas[0].type == pw_core_type_->data.DmaBuf) { ++#endif ++ map.initialize( ++ static_cast( ++ mmap(nullptr, ++ spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset, ++ PROT_READ, MAP_PRIVATE, spaBuffer->datas[0].fd, 0)), ++ spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset, ++#if PW_CHECK_VERSION(0, 3, 0) ++ spaBuffer->datas[0].type == SPA_DATA_DmaBuf, ++#else ++ spaBuffer->datas[0].type == pw_core_type_->data.DmaBuf, ++#endif ++ spaBuffer->datas[0].fd); ++ ++ if (!map) { ++ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " ++ << std::strerror(errno); ++ return; ++ } ++ ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) { ++#else ++ if (spaBuffer->datas[0].type == pw_core_type_->data.DmaBuf) { ++#endif ++ SyncDmaBuf(spaBuffer->datas[0].fd, DMA_BUF_SYNC_START); ++ } ++ ++ src = SPA_MEMBER(map.get(), spaBuffer->datas[0].mapoffset, uint8_t); ++#if PW_CHECK_VERSION(0, 3, 0) ++ } else if (spaBuffer->datas[0].type == SPA_DATA_MemPtr) { ++#else ++ } else if (spaBuffer->datas[0].type == pw_core_type_->data.MemPtr) { ++#endif ++ src = static_cast(spaBuffer->datas[0].data); ++ } + +- if (!(src = spaBuffer->datas[0].data)) { ++ if (!src) { ++ return; ++ } ++ ++#if PW_CHECK_VERSION(0, 3, 0) ++ struct spa_meta_region* video_metadata = ++ static_cast(spa_buffer_find_meta_data( ++ spaBuffer, SPA_META_VideoCrop, sizeof(*video_metadata))); ++#else ++ struct spa_meta_video_crop* video_metadata = ++ static_cast( ++ spa_buffer_find_meta(spaBuffer, pw_core_type_->meta.VideoCrop)); ++#endif ++ ++ // Video size from metadata is bigger than an actual video stream size. ++ // The metadata are wrong or we should up-scale the video...in both cases ++ // just quit now. ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (video_metadata && (video_metadata->region.size.width > ++ static_cast(desktop_size_.width()) || ++ video_metadata->region.size.height > ++ static_cast(desktop_size_.height()))) { ++#else ++ if (video_metadata && (video_metadata->width > desktop_size_.width() || ++ video_metadata->height > desktop_size_.height())) { ++#endif ++ RTC_LOG(LS_ERROR) << "Stream metadata sizes are wrong!"; + return; + } + +- uint32_t maxSize = spaBuffer->datas[0].maxsize; +- int32_t srcStride = spaBuffer->datas[0].chunk->stride; +- if (srcStride != (desktop_size_.width() * kBytesPerPixel)) { ++ // Use video metadata when video size from metadata is set and smaller than ++ // video stream size, so we need to adjust it. ++ bool video_is_full_width = true; ++ bool video_is_full_height = true; ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (video_metadata && video_metadata->region.size.width != 0 && ++ video_metadata->region.size.height != 0) { ++ if (video_metadata->region.size.width < ++ static_cast(desktop_size_.width())) { ++ video_is_full_width = false; ++ } else if (video_metadata->region.size.height < ++ static_cast(desktop_size_.height())) { ++ video_is_full_height = false; ++ } ++ } ++#else ++ if (video_metadata && video_metadata->width != 0 && ++ video_metadata->height != 0) { ++ if (video_metadata->width < desktop_size_.width()) { ++ } else if (video_metadata->height < desktop_size_.height()) { ++ video_is_full_height = false; ++ } ++ } ++#endif ++ ++ DesktopSize video_size_prev = video_size_; ++ if (!video_is_full_height || !video_is_full_width) { ++#if PW_CHECK_VERSION(0, 3, 0) ++ video_size_ = DesktopSize(video_metadata->region.size.width, ++ video_metadata->region.size.height); ++#else ++ video_size_ = DesktopSize(video_metadata->width, video_metadata->height); ++#endif ++ } else { ++ video_size_ = desktop_size_; ++ } ++ ++ webrtc::MutexLock lock(¤t_frame_lock_); ++ if (!current_frame_ || !video_size_.equals(video_size_prev)) { ++ current_frame_ = std::make_unique( ++ video_size_.width() * video_size_.height() * kBytesPerPixel); ++ } ++ ++ const int32_t dst_stride = video_size_.width() * kBytesPerPixel; ++ const int32_t src_stride = spaBuffer->datas[0].chunk->stride; ++ ++ if (src_stride != (desktop_size_.width() * kBytesPerPixel)) { + RTC_LOG(LS_ERROR) << "Got buffer with stride different from screen stride: " +- << srcStride ++ << src_stride + << " != " << (desktop_size_.width() * kBytesPerPixel); + portal_init_failed_ = true; ++ + return; + } + +- if (!current_frame_) { +- current_frame_ = static_cast(malloc(maxSize)); +- } +- RTC_DCHECK(current_frame_ != nullptr); +- +- // If both sides decided to go with the RGBx format we need to convert it to +- // BGRx to match color format expected by WebRTC. +- if (spa_video_format_->format == pw_type_->video_format.RGBx) { +- uint8_t* tempFrame = static_cast(malloc(maxSize)); +- std::memcpy(tempFrame, src, maxSize); +- ConvertRGBxToBGRx(tempFrame, maxSize); +- std::memcpy(current_frame_, tempFrame, maxSize); +- free(tempFrame); +- } else { +- std::memcpy(current_frame_, src, maxSize); ++ // Adjust source content based on metadata video position ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (!video_is_full_height && ++ (video_metadata->region.position.y + video_size_.height() <= ++ desktop_size_.height())) { ++ src += src_stride * video_metadata->region.position.y; ++ } ++ const int x_offset = ++ !video_is_full_width && ++ (video_metadata->region.position.x + video_size_.width() <= ++ desktop_size_.width()) ++ ? video_metadata->region.position.x * kBytesPerPixel ++ : 0; ++#else ++ if (!video_is_full_height && ++ (video_metadata->y + video_size_.height() <= desktop_size_.height())) { ++ src += src_stride * video_metadata->y; ++ } ++ ++ const int x_offset = ++ !video_is_full_width && ++ (video_metadata->x + video_size_.width() <= desktop_size_.width()) ++ ? video_metadata->x * kBytesPerPixel ++ : 0; ++#endif ++ ++ uint8_t* dst = current_frame_.get(); ++ for (int i = 0; i < video_size_.height(); ++i) { ++ // Adjust source content based on crop video position if needed ++ src += x_offset; ++ std::memcpy(dst, src, dst_stride); ++ // If both sides decided to go with the RGBx format we need to convert it to ++ // BGRx to match color format expected by WebRTC. ++#if PW_CHECK_VERSION(0, 3, 0) ++ if (spa_video_format_.format == SPA_VIDEO_FORMAT_RGBx || ++ spa_video_format_.format == SPA_VIDEO_FORMAT_RGBA) { ++#else ++ if (spa_video_format_->format == pw_type_->video_format.RGBx || ++ spa_video_format_->format == pw_type_->video_format.RGBA) { ++#endif ++ ConvertRGBxToBGRx(dst, dst_stride); ++ } ++ src += src_stride - x_offset; ++ dst += dst_stride; + } + } + +@@ -441,14 +898,13 @@ void BaseCapturerPipeWire::OnProxyRequested(GObject* /*object*/, + BaseCapturerPipeWire* that = static_cast(user_data); + RTC_DCHECK(that); + +- GError* error = nullptr; +- GDBusProxy *proxy = g_dbus_proxy_new_finish(result, &error); ++ Scoped error; ++ GDBusProxy* proxy = g_dbus_proxy_new_finish(result, error.receive()); + if (!proxy) { +- if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ if (g_error_matches(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED)) + return; + RTC_LOG(LS_ERROR) << "Failed to create a proxy for the screen cast portal: " + << error->message; +- g_error_free(error); + that->portal_init_failed_ = true; + return; + } +@@ -462,38 +918,36 @@ void BaseCapturerPipeWire::OnProxyRequested(GObject* /*object*/, + // static + gchar* BaseCapturerPipeWire::PrepareSignalHandle(GDBusConnection* connection, + const gchar* token) { +- gchar* sender = g_strdup(g_dbus_connection_get_unique_name(connection) + 1); +- for (int i = 0; sender[i]; i++) { +- if (sender[i] == '.') { +- sender[i] = '_'; ++ Scoped sender( ++ g_strdup(g_dbus_connection_get_unique_name(connection) + 1)); ++ for (int i = 0; sender.get()[i]; i++) { ++ if (sender.get()[i] == '.') { ++ sender.get()[i] = '_'; + } + } + +- gchar* handle = g_strconcat(kDesktopRequestObjectPath, "/", sender, "/", ++ gchar* handle = g_strconcat(kDesktopRequestObjectPath, "/", sender.get(), "/", + token, /*end of varargs*/ nullptr); +- g_free(sender); + + return handle; + } + + void BaseCapturerPipeWire::SessionRequest() { + GVariantBuilder builder; +- gchar* variant_string; ++ Scoped variant_string; + + g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); + variant_string = + g_strdup_printf("webrtc_session%d", g_random_int_range(0, G_MAXINT)); + g_variant_builder_add(&builder, "{sv}", "session_handle_token", +- g_variant_new_string(variant_string)); +- g_free(variant_string); ++ g_variant_new_string(variant_string.get())); + variant_string = g_strdup_printf("webrtc%d", g_random_int_range(0, G_MAXINT)); + g_variant_builder_add(&builder, "{sv}", "handle_token", +- g_variant_new_string(variant_string)); ++ g_variant_new_string(variant_string.get())); + +- portal_handle_ = PrepareSignalHandle(connection_, variant_string); ++ portal_handle_ = PrepareSignalHandle(connection_, variant_string.get()); + session_request_signal_id_ = SetupRequestResponseSignal( + portal_handle_, OnSessionRequestResponseSignal); +- g_free(variant_string); + + RTC_LOG(LS_INFO) << "Screen cast session requested."; + g_dbus_proxy_call( +@@ -509,22 +963,21 @@ void BaseCapturerPipeWire::OnSessionRequested(GDBusProxy *proxy, + BaseCapturerPipeWire* that = static_cast(user_data); + RTC_DCHECK(that); + +- GError* error = nullptr; +- GVariant* variant = g_dbus_proxy_call_finish(proxy, result, &error); ++ Scoped error; ++ Scoped variant( ++ g_dbus_proxy_call_finish(proxy, result, error.receive())); + if (!variant) { +- if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ if (g_error_matches(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED)) + return; + RTC_LOG(LS_ERROR) << "Failed to create a screen cast session: " + << error->message; +- g_error_free(error); + that->portal_init_failed_ = true; + return; + } + RTC_LOG(LS_INFO) << "Initializing the screen cast session."; + +- gchar* handle = nullptr; +- g_variant_get_child(variant, 0, "o", &handle); +- g_variant_unref(variant); ++ Scoped handle; ++ g_variant_get_child(variant.get(), 0, "o", &handle); + if (!handle) { + RTC_LOG(LS_ERROR) << "Failed to initialize the screen cast session."; + if (that->session_request_signal_id_) { +@@ -536,8 +989,6 @@ void BaseCapturerPipeWire::OnSessionRequested(GDBusProxy *proxy, + return; + } + +- g_free(handle); +- + RTC_LOG(LS_INFO) << "Subscribing to the screen cast session."; + } + +@@ -557,11 +1008,11 @@ void BaseCapturerPipeWire::OnSessionRequestResponseSignal( + << "Received response for the screen cast session subscription."; + + guint32 portal_response; +- GVariant* response_data; +- g_variant_get(parameters, "(u@a{sv})", &portal_response, &response_data); +- g_variant_lookup(response_data, "session_handle", "s", ++ Scoped response_data; ++ g_variant_get(parameters, "(u@a{sv})", &portal_response, ++ response_data.receive()); ++ g_variant_lookup(response_data.get(), "session_handle", "s", + &that->session_handle_); +- g_variant_unref(response_data); + + if (!that->session_handle_ || portal_response) { + RTC_LOG(LS_ERROR) +@@ -575,23 +1026,23 @@ void BaseCapturerPipeWire::OnSessionRequestResponseSignal( + + void BaseCapturerPipeWire::SourcesRequest() { + GVariantBuilder builder; +- gchar* variant_string; ++ Scoped variant_string; + + g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); + // We want to record monitor content. +- g_variant_builder_add(&builder, "{sv}", "types", +- g_variant_new_uint32(capture_source_type_)); ++ g_variant_builder_add( ++ &builder, "{sv}", "types", ++ g_variant_new_uint32(static_cast(capture_source_type_))); + // We don't want to allow selection of multiple sources. + g_variant_builder_add(&builder, "{sv}", "multiple", + g_variant_new_boolean(false)); + variant_string = g_strdup_printf("webrtc%d", g_random_int_range(0, G_MAXINT)); + g_variant_builder_add(&builder, "{sv}", "handle_token", +- g_variant_new_string(variant_string)); ++ g_variant_new_string(variant_string.get())); + +- sources_handle_ = PrepareSignalHandle(connection_, variant_string); ++ sources_handle_ = PrepareSignalHandle(connection_, variant_string.get()); + sources_request_signal_id_ = SetupRequestResponseSignal( + sources_handle_, OnSourcesRequestResponseSignal); +- g_free(variant_string); + + RTC_LOG(LS_INFO) << "Requesting sources from the screen cast session."; + g_dbus_proxy_call( +@@ -608,22 +1059,21 @@ void BaseCapturerPipeWire::OnSourcesRequested(GDBusProxy *proxy, + BaseCapturerPipeWire* that = static_cast(user_data); + RTC_DCHECK(that); + +- GError* error = nullptr; +- GVariant* variant = g_dbus_proxy_call_finish(proxy, result, &error); ++ Scoped error; ++ Scoped variant( ++ g_dbus_proxy_call_finish(proxy, result, error.receive())); + if (!variant) { +- if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ if (g_error_matches(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED)) + return; + RTC_LOG(LS_ERROR) << "Failed to request the sources: " << error->message; +- g_error_free(error); + that->portal_init_failed_ = true; + return; + } + + RTC_LOG(LS_INFO) << "Sources requested from the screen cast session."; + +- gchar* handle = nullptr; +- g_variant_get_child(variant, 0, "o", &handle); +- g_variant_unref(variant); ++ Scoped handle; ++ g_variant_get_child(variant.get(), 0, "o", handle.receive()); + if (!handle) { + RTC_LOG(LS_ERROR) << "Failed to initialize the screen cast session."; + if (that->sources_request_signal_id_) { +@@ -635,8 +1085,6 @@ void BaseCapturerPipeWire::OnSourcesRequested(GDBusProxy *proxy, + return; + } + +- g_free(handle); +- + RTC_LOG(LS_INFO) << "Subscribed to sources signal."; + } + +@@ -668,17 +1116,16 @@ void BaseCapturerPipeWire::OnSourcesRequestResponseSignal( + + void BaseCapturerPipeWire::StartRequest() { + GVariantBuilder builder; +- gchar* variant_string; ++ Scoped variant_string; + + g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); + variant_string = g_strdup_printf("webrtc%d", g_random_int_range(0, G_MAXINT)); + g_variant_builder_add(&builder, "{sv}", "handle_token", +- g_variant_new_string(variant_string)); ++ g_variant_new_string(variant_string.get())); + +- start_handle_ = PrepareSignalHandle(connection_, variant_string); ++ start_handle_ = PrepareSignalHandle(connection_, variant_string.get()); + start_request_signal_id_ = + SetupRequestResponseSignal(start_handle_, OnStartRequestResponseSignal); +- g_free(variant_string); + + // "Identifier for the application window", this is Wayland, so not "x11:...". + const gchar parent_window[] = ""; +@@ -698,23 +1145,22 @@ void BaseCapturerPipeWire::OnStartRequested(GDBusProxy *proxy, + BaseCapturerPipeWire* that = static_cast(user_data); + RTC_DCHECK(that); + +- GError* error = nullptr; +- GVariant* variant = g_dbus_proxy_call_finish(proxy, result, &error); ++ Scoped error; ++ Scoped variant( ++ g_dbus_proxy_call_finish(proxy, result, error.receive())); + if (!variant) { +- if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ if (g_error_matches(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED)) + return; + RTC_LOG(LS_ERROR) << "Failed to start the screen cast session: " + << error->message; +- g_error_free(error); + that->portal_init_failed_ = true; + return; + } + + RTC_LOG(LS_INFO) << "Initializing the start of the screen cast session."; + +- gchar* handle = nullptr; +- g_variant_get_child(variant, 0, "o", &handle); +- g_variant_unref(variant); ++ Scoped handle; ++ g_variant_get_child(variant.get(), 0, "o", handle.receive()); + if (!handle) { + RTC_LOG(LS_ERROR) + << "Failed to initialize the start of the screen cast session."; +@@ -727,8 +1173,6 @@ void BaseCapturerPipeWire::OnStartRequested(GDBusProxy *proxy, + return; + } + +- g_free(handle); +- + RTC_LOG(LS_INFO) << "Subscribed to the start signal."; + } + +@@ -746,9 +1190,10 @@ void BaseCapturerPipeWire::OnStartRequestResponseSignal( + + RTC_LOG(LS_INFO) << "Start signal received."; + guint32 portal_response; +- GVariant* response_data; +- GVariantIter* iter = nullptr; +- g_variant_get(parameters, "(u@a{sv})", &portal_response, &response_data); ++ Scoped response_data; ++ Scoped iter; ++ g_variant_get(parameters, "(u@a{sv})", &portal_response, ++ response_data.receive()); + if (portal_response || !response_data) { + RTC_LOG(LS_ERROR) << "Failed to start the screen cast session."; + that->portal_init_failed_ = true; +@@ -758,28 +1203,28 @@ void BaseCapturerPipeWire::OnStartRequestResponseSignal( + // Array of PipeWire streams. See + // https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.ScreenCast.xml + // documentation for . +- if (g_variant_lookup(response_data, "streams", "a(ua{sv})", &iter)) { +- GVariant* variant; ++ if (g_variant_lookup(response_data.get(), "streams", "a(ua{sv})", ++ iter.receive())) { ++ Scoped variant; + +- while (g_variant_iter_next(iter, "@(ua{sv})", &variant)) { ++ while (g_variant_iter_next(iter.get(), "@(ua{sv})", variant.receive())) { + guint32 stream_id; +- gint32 width; +- gint32 height; +- GVariant* options; ++ guint32 type; ++ Scoped options; + +- g_variant_get(variant, "(u@a{sv})", &stream_id, &options); +- RTC_DCHECK(options != nullptr); ++ g_variant_get(variant.get(), "(u@a{sv})", &stream_id, options.receive()); ++ RTC_DCHECK(options.get()); + +- g_variant_lookup(options, "size", "(ii)", &width, &height); ++ if (g_variant_lookup(options.get(), "source_type", "u", &type)) { ++ that->capture_source_type_ = ++ static_cast(type); ++ } + +- that->desktop_size_.set(width, height); ++ that->pw_stream_node_id_ = stream_id; + +- g_variant_unref(options); +- g_variant_unref(variant); ++ break; + } + } +- g_variant_iter_free(iter); +- g_variant_unref(response_data); + + that->OpenPipeWireRemote(); + } +@@ -807,35 +1252,30 @@ void BaseCapturerPipeWire::OnOpenPipeWireRemoteRequested( + BaseCapturerPipeWire* that = static_cast(user_data); + RTC_DCHECK(that); + +- GError* error = nullptr; +- GUnixFDList* outlist = nullptr; +- GVariant* variant = g_dbus_proxy_call_with_unix_fd_list_finish( +- proxy, &outlist, result, &error); ++ Scoped error; ++ Scoped outlist; ++ Scoped variant(g_dbus_proxy_call_with_unix_fd_list_finish( ++ proxy, outlist.receive(), result, error.receive())); + if (!variant) { +- if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ if (g_error_matches(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED)) + return; + RTC_LOG(LS_ERROR) << "Failed to open the PipeWire remote: " + << error->message; +- g_error_free(error); + that->portal_init_failed_ = true; + return; + } + + gint32 index; +- g_variant_get(variant, "(h)", &index); ++ g_variant_get(variant.get(), "(h)", &index); + +- if ((that->pw_fd_ = g_unix_fd_list_get(outlist, index, &error)) == -1) { ++ if ((that->pw_fd_ = ++ g_unix_fd_list_get(outlist.get(), index, error.receive())) == -1) { + RTC_LOG(LS_ERROR) << "Failed to get file descriptor from the list: " + << error->message; +- g_error_free(error); +- g_variant_unref(variant); + that->portal_init_failed_ = true; + return; + } + +- g_variant_unref(variant); +- g_object_unref(outlist); +- + that->InitPipeWire(); + } + +@@ -854,15 +1294,18 @@ void BaseCapturerPipeWire::CaptureFrame() { + return; + } + ++ webrtc::MutexLock lock(¤t_frame_lock_); + if (!current_frame_) { + callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); + return; + } + +- std::unique_ptr result(new BasicDesktopFrame(desktop_size_)); ++ DesktopSize frame_size = video_size_; ++ ++ std::unique_ptr result(new BasicDesktopFrame(frame_size)); + result->CopyPixelsFrom( +- current_frame_, (desktop_size_.width() * kBytesPerPixel), +- DesktopRect::MakeWH(desktop_size_.width(), desktop_size_.height())); ++ current_frame_.get(), (frame_size.width() * kBytesPerPixel), ++ DesktopRect::MakeWH(frame_size.width(), frame_size.height())); + if (!result) { + callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); + return; +@@ -887,4 +1330,11 @@ bool BaseCapturerPipeWire::SelectSource(SourceId id) { + return true; + } + ++// static ++std::unique_ptr BaseCapturerPipeWire::CreateRawCapturer( ++ const DesktopCaptureOptions& options) { ++ return std::make_unique( ++ BaseCapturerPipeWire::CaptureSourceType::kAny); ++} ++ + } // namespace webrtc +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h +index f28d7a5..75d20db 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h +@@ -10,18 +10,23 @@ + + #ifndef MODULES_DESKTOP_CAPTURE_LINUX_BASE_CAPTURER_PIPEWIRE_H_ + #define MODULES_DESKTOP_CAPTURE_LINUX_BASE_CAPTURER_PIPEWIRE_H_ +- + #include + #define typeof __typeof__ + #include + #include ++#if PW_CHECK_VERSION(0, 3, 0) ++#include ++#endif + ++#include "absl/types/optional.h" + #include "modules/desktop_capture/desktop_capture_options.h" + #include "modules/desktop_capture/desktop_capturer.h" + #include "rtc_base/constructor_magic.h" ++#include "rtc_base/synchronization/mutex.h" + + namespace webrtc { + ++#if !PW_CHECK_VERSION(0, 3, 0) + class PipeWireType { + public: + spa_type_media_type media_type; +@@ -29,14 +34,25 @@ class PipeWireType { + spa_type_format_video format_video; + spa_type_video_format video_format; + }; ++#endif + + class BaseCapturerPipeWire : public DesktopCapturer { + public: +- enum CaptureSourceType { Screen = 1, Window }; ++ // Values are set based on source type property in ++ // xdg-desktop-portal/screencast ++ // https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.ScreenCast.xml ++ enum class CaptureSourceType : uint32_t { ++ kScreen = 0b01, ++ kWindow = 0b10, ++ kAny = 0b11 ++ }; + + explicit BaseCapturerPipeWire(CaptureSourceType source_type); + ~BaseCapturerPipeWire() override; + ++ static std::unique_ptr CreateRawCapturer( ++ const DesktopCaptureOptions& options); ++ + // DesktopCapturer interface. + void Start(Callback* delegate) override; + void CaptureFrame() override; +@@ -45,6 +61,21 @@ class BaseCapturerPipeWire : public DesktopCapturer { + + private: + // PipeWire types --> ++#if PW_CHECK_VERSION(0, 3, 0) ++ struct pw_context* pw_context_ = nullptr; ++ struct pw_core* pw_core_ = nullptr; ++ struct pw_stream* pw_stream_ = nullptr; ++ struct pw_thread_loop* pw_main_loop_ = nullptr; ++ ++ spa_hook spa_core_listener_; ++ spa_hook spa_stream_listener_; ++ ++ // event handlers ++ pw_core_events pw_core_events_ = {}; ++ pw_stream_events pw_stream_events_ = {}; ++ ++ struct spa_video_info_raw spa_video_format_; ++#else + pw_core* pw_core_ = nullptr; + pw_type* pw_core_type_ = nullptr; + pw_stream* pw_stream_ = nullptr; +@@ -60,11 +91,13 @@ class BaseCapturerPipeWire : public DesktopCapturer { + pw_remote_events pw_remote_events_ = {}; + + spa_video_info_raw* spa_video_format_ = nullptr; ++#endif + ++ guint32 pw_stream_node_id_ = 0; + gint32 pw_fd_ = -1; + + CaptureSourceType capture_source_type_ = +- BaseCapturerPipeWire::CaptureSourceType::Screen; ++ BaseCapturerPipeWire::CaptureSourceType::kScreen; + + // <-- end of PipeWire types + +@@ -79,10 +112,12 @@ class BaseCapturerPipeWire : public DesktopCapturer { + guint sources_request_signal_id_ = 0; + guint start_request_signal_id_ = 0; + ++ DesktopSize video_size_; + DesktopSize desktop_size_ = {}; + DesktopCaptureOptions options_ = {}; + +- uint8_t* current_frame_ = nullptr; ++ webrtc::Mutex current_frame_lock_; ++ std::unique_ptr current_frame_; + Callback* callback_ = nullptr; + + bool portal_init_failed_ = false; +@@ -91,21 +126,32 @@ class BaseCapturerPipeWire : public DesktopCapturer { + void InitPipeWire(); + void InitPipeWireTypes(); + +- void CreateReceivingStream(); ++ pw_stream* CreateReceivingStream(); + void HandleBuffer(pw_buffer* buffer); + + void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size); + ++#if PW_CHECK_VERSION(0, 3, 0) ++ static void OnCoreError(void* data, ++ uint32_t id, ++ int seq, ++ int res, ++ const char* message); ++ static void OnStreamParamChanged(void* data, ++ uint32_t id, ++ const struct spa_pod* format); ++#else + static void OnStateChanged(void* data, + pw_remote_state old_state, + pw_remote_state state, + const char* error); ++ static void OnStreamFormatChanged(void* data, const struct spa_pod* format); ++#endif + static void OnStreamStateChanged(void* data, + pw_stream_state old_state, + pw_stream_state state, + const char* error_message); + +- static void OnStreamFormatChanged(void* data, const struct spa_pod* format); + static void OnStreamProcess(void* data); + static void OnNewBuffer(void* data, uint32_t id); + +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire.sigs b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire02.sigs +similarity index 91% +rename from src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire.sigs +rename to src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire02.sigs +index 3e21e9d..5ac3d1d 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire.sigs ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire02.sigs +@@ -26,6 +26,7 @@ void pw_remote_add_listener(pw_remote *remote, spa_hook *listener, const pw_remo + int pw_remote_connect_fd(pw_remote *remote, int fd); + void pw_remote_destroy(pw_remote *remote); + pw_remote * pw_remote_new(pw_core *core, pw_properties *properties, size_t user_data_size); ++enum pw_remote_state pw_remote_get_state(pw_remote *remote, const char **error); + + // stream.h + void pw_stream_add_listener(pw_stream *stream, spa_hook *listener, const pw_stream_events *events, void *data); +@@ -42,3 +43,5 @@ void pw_thread_loop_destroy(pw_thread_loop *loop); + pw_thread_loop * pw_thread_loop_new(pw_loop *loop, const char *name); + int pw_thread_loop_start(pw_thread_loop *loop); + void pw_thread_loop_stop(pw_thread_loop *loop); ++void pw_thread_loop_lock(struct pw_thread_loop *loop); ++void pw_thread_loop_unlock(struct pw_thread_loop *loop); +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire03.sigs b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire03.sigs +new file mode 100644 +index 0000000..78d241f +--- /dev/null ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/pipewire03.sigs +@@ -0,0 +1,46 @@ ++// Copyright 2018 The WebRTC project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++//------------------------------------------------ ++// Functions from PipeWire used in capturer code. ++//------------------------------------------------ ++ ++// core.h ++int pw_core_disconnect(pw_core *core); ++ ++// loop.h ++void pw_loop_destroy(pw_loop *loop); ++pw_loop * pw_loop_new(const spa_dict *props); ++ ++ ++// pipewire.h ++void pw_init(int *argc, char **argv[]); ++ ++// properties.h ++pw_properties * pw_properties_new_string(const char *args); ++ ++// stream.h ++void pw_stream_add_listener(pw_stream *stream, spa_hook *listener, const pw_stream_events *events, void *data); ++int pw_stream_connect(pw_stream *stream, enum pw_direction direction, uint32_t target_id, enum pw_stream_flags flags, const spa_pod **params, uint32_t n_params); ++pw_buffer *pw_stream_dequeue_buffer(pw_stream *stream); ++void pw_stream_destroy(pw_stream *stream); ++pw_stream * pw_stream_new(pw_core *core, const char *name, pw_properties *props); ++int pw_stream_queue_buffer(pw_stream *stream, pw_buffer *buffer); ++int pw_stream_set_active(pw_stream *stream, bool active); ++int pw_stream_update_params(pw_stream *stream, const spa_pod **params, uint32_t n_params); ++ ++// thread-loop.h ++void pw_thread_loop_destroy(pw_thread_loop *loop); ++pw_thread_loop * pw_thread_loop_new(const char *name, const spa_dict *props); ++int pw_thread_loop_start(pw_thread_loop *loop); ++void pw_thread_loop_stop(pw_thread_loop *loop); ++void pw_thread_loop_lock(pw_thread_loop *loop); ++void pw_thread_loop_unlock(pw_thread_loop *loop); ++pw_loop * pw_thread_loop_get_loop(pw_thread_loop *loop); ++ ++ ++// context.h ++void pw_context_destroy(pw_context *context); ++pw_context *pw_context_new(pw_loop *main_loop, pw_properties *props, size_t user_data_size); ++pw_core * pw_context_connect(pw_context *context, pw_properties *properties, size_t user_data_size); +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc +deleted file mode 100644 +index fe67214..0000000 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc ++++ /dev/null +@@ -1,29 +0,0 @@ +-/* +- * Copyright 2018 The WebRTC project authors. All Rights Reserved. +- * +- * Use of this source code is governed by a BSD-style license +- * that can be found in the LICENSE file in the root of the source +- * tree. An additional intellectual property rights grant can be found +- * in the file PATENTS. All contributing project authors may +- * be found in the AUTHORS file in the root of the source tree. +- */ +- +-#include "modules/desktop_capture/linux/screen_capturer_pipewire.h" +- +-#include +- +- +-namespace webrtc { +- +-ScreenCapturerPipeWire::ScreenCapturerPipeWire() +- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Screen) {} +-ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {} +- +-// static +-std::unique_ptr +-ScreenCapturerPipeWire::CreateRawScreenCapturer( +- const DesktopCaptureOptions& options) { +- return std::make_unique(); +-} +- +-} // namespace webrtc +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.h b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.h +deleted file mode 100644 +index 66dcd68..0000000 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.h ++++ /dev/null +@@ -1,33 +0,0 @@ +-/* +- * Copyright 2018 The WebRTC project authors. All Rights Reserved. +- * +- * Use of this source code is governed by a BSD-style license +- * that can be found in the LICENSE file in the root of the source +- * tree. An additional intellectual property rights grant can be found +- * in the file PATENTS. All contributing project authors may +- * be found in the AUTHORS file in the root of the source tree. +- */ +- +-#ifndef MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_PIPEWIRE_H_ +-#define MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_PIPEWIRE_H_ +- +-#include +- +-#include "modules/desktop_capture/linux/base_capturer_pipewire.h" +- +-namespace webrtc { +- +-class ScreenCapturerPipeWire : public BaseCapturerPipeWire { +- public: +- ScreenCapturerPipeWire(); +- ~ScreenCapturerPipeWire() override; +- +- static std::unique_ptr CreateRawScreenCapturer( +- const DesktopCaptureOptions& options); +- +- RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerPipeWire); +-}; +- +-} // namespace webrtc +- +-#endif // MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_PIPEWIRE_H_ +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc +deleted file mode 100644 +index b455915..0000000 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc ++++ /dev/null +@@ -1,29 +0,0 @@ +-/* +- * Copyright 2018 The WebRTC project authors. All Rights Reserved. +- * +- * Use of this source code is governed by a BSD-style license +- * that can be found in the LICENSE file in the root of the source +- * tree. An additional intellectual property rights grant can be found +- * in the file PATENTS. All contributing project authors may +- * be found in the AUTHORS file in the root of the source tree. +- */ +- +-#include "modules/desktop_capture/linux/window_capturer_pipewire.h" +- +-#include +- +- +-namespace webrtc { +- +-WindowCapturerPipeWire::WindowCapturerPipeWire() +- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Window) {} +-WindowCapturerPipeWire::~WindowCapturerPipeWire() {} +- +-// static +-std::unique_ptr +-WindowCapturerPipeWire::CreateRawWindowCapturer( +- const DesktopCaptureOptions& options) { +- return std::make_unique(); +-} +- +-} // namespace webrtc +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.h b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.h +deleted file mode 100644 +index 7f184ef..0000000 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.h ++++ /dev/null +@@ -1,33 +0,0 @@ +-/* +- * Copyright 2018 The WebRTC project authors. All Rights Reserved. +- * +- * Use of this source code is governed by a BSD-style license +- * that can be found in the LICENSE file in the root of the source +- * tree. An additional intellectual property rights grant can be found +- * in the file PATENTS. All contributing project authors may +- * be found in the AUTHORS file in the root of the source tree. +- */ +- +-#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_PIPEWIRE_H_ +-#define MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_PIPEWIRE_H_ +- +-#include +- +-#include "modules/desktop_capture/linux/base_capturer_pipewire.h" +- +-namespace webrtc { +- +-class WindowCapturerPipeWire : public BaseCapturerPipeWire { +- public: +- WindowCapturerPipeWire(); +- ~WindowCapturerPipeWire() override; +- +- static std::unique_ptr CreateRawWindowCapturer( +- const DesktopCaptureOptions& options); +- +- RTC_DISALLOW_COPY_AND_ASSIGN(WindowCapturerPipeWire); +-}; +- +-} // namespace webrtc +- +-#endif // MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_PIPEWIRE_H_ +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_linux.cc b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_linux.cc +index 82dbae4..ed48b7d 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_linux.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_linux.cc +@@ -14,7 +14,7 @@ + #include "modules/desktop_capture/desktop_capturer.h" + + #if defined(WEBRTC_USE_PIPEWIRE) +-#include "modules/desktop_capture/linux/screen_capturer_pipewire.h" ++#include "modules/desktop_capture/linux/base_capturer_pipewire.h" + #endif // defined(WEBRTC_USE_PIPEWIRE) + + #if defined(WEBRTC_USE_X11) +@@ -28,7 +28,7 @@ std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( + const DesktopCaptureOptions& options) { + #if defined(WEBRTC_USE_PIPEWIRE) + if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { +- return ScreenCapturerPipeWire::CreateRawScreenCapturer(options); ++ return BaseCapturerPipeWire::CreateRawCapturer(options); + } + #endif // defined(WEBRTC_USE_PIPEWIRE) + +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/window_capturer_linux.cc b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/window_capturer_linux.cc +index 41dbf83..2b142ae 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/window_capturer_linux.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/window_capturer_linux.cc +@@ -14,7 +14,7 @@ + #include "modules/desktop_capture/desktop_capturer.h" + + #if defined(WEBRTC_USE_PIPEWIRE) +-#include "modules/desktop_capture/linux/window_capturer_pipewire.h" ++#include "modules/desktop_capture/linux/base_capturer_pipewire.h" + #endif // defined(WEBRTC_USE_PIPEWIRE) + + #if defined(WEBRTC_USE_X11) +@@ -28,7 +28,7 @@ std::unique_ptr DesktopCapturer::CreateRawWindowCapturer( + const DesktopCaptureOptions& options) { + #if defined(WEBRTC_USE_PIPEWIRE) + if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { +- return WindowCapturerPipeWire::CreateRawWindowCapturer(options); ++ return BaseCapturerPipeWire::CreateRawCapturer(options); + } + #endif // defined(WEBRTC_USE_PIPEWIRE) + +diff --git a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni +index ca8acdb..505c975 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni ++++ b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni +@@ -117,6 +117,10 @@ declare_args() { + # Set this to link PipeWire directly instead of using the dlopen. + rtc_link_pipewire = false + ++ # Set this to use certain PipeWire version ++ # Currently we support PipeWire 0.2 (default) and PipeWire 0.3 ++ rtc_pipewire_version = "0.3" ++ + # Enable to use the Mozilla internal settings. + build_with_mozilla = false + +-- +2.37.3 + diff --git a/rtc-dont-use-h264.patch b/rtc-dont-use-h264.patch new file mode 100644 index 0000000..ddb2463 --- /dev/null +++ b/rtc-dont-use-h264.patch @@ -0,0 +1,32 @@ +From: Fabian Vogt +Subject: Don't require open264 when proprietary_codecs are supported + +diff --git a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni b/chromium/third_party/webrtc/webrtc.gni +index ca8acdbf259..36897a72aa8 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni ++++ b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni +@@ -151,8 +151,7 @@ declare_args() { + # + # Enabling H264 when building with MSVC is currently not supported, see + # bugs.webrtc.org/9213#c13 for more info. +- rtc_use_h264 = +- proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang) ++ rtc_use_h264 = false + + # Enable this flag to make webrtc::Mutex be implemented by absl::Mutex. + rtc_use_absl_mutex = false + +diff --git a/src/core/config/common.pri b/src/core/config/common.pri +index d9d64e76..cd0fd120 100644 +--- a/src/core/config/common.pri ++++ b/src/core/config/common.pri +@@ -26,9 +26,6 @@ qtConfig(webengine-webrtc) { + + qtConfig(webengine-proprietary-codecs) { + gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\" +- qtConfig(webengine-webrtc) { +- gn_args += rtc_use_h264=true +- } + } else { + gn_args += proprietary_codecs=false + } diff --git a/sandbox_futex_time64.patch b/sandbox_futex_time64.patch new file mode 100644 index 0000000..5858f1c --- /dev/null +++ b/sandbox_futex_time64.patch @@ -0,0 +1,53 @@ +From 6abdfb1d7638c787081d16bb90022cde7a86309f Mon Sep 17 00:00:00 2001 +From: Matthew Denton +Date: Tue, 16 Mar 2021 06:38:05 +0000 +Subject: [PATCH] Linux sandbox: support futex_time64 on 32-bit platforms + +This updates futex-related syscall sets to include futex_time64, which +is a version of the futex syscall which uses 64 bit time on 32-bit +systems, to prepare for the Y2038 problem. + +Change-Id: Ie933d9fec221233bf837f00c08eb7daee204081d +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2753571 +Commit-Queue: Matthew Denton +Reviewed-by: Robert Sesek +Cr-Commit-Position: refs/heads/master@{#863166} +--- + sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 7 ++++++- + sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 3 +++ + 2 files changed, 9 insertions(+), 1 deletion(-) + + +diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +index 5e650d93c4b..b37f082dd69 100644 +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +@@ -198,8 +198,13 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, + } + #endif + +- if (sysno == __NR_futex) ++ if (sysno == __NR_futex ++#if defined(__NR_futex_time64) ++ || sysno == __NR_futex_time64 ++#endif ++ ) { + return RestrictFutex(); ++ } + + if (sysno == __NR_set_robust_list) + return Error(EPERM); +diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +index d1ea8e99a1c..3a8a924cc0a 100644 +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -427,6 +427,9 @@ bool SyscallSets::IsAllowedFutex(int sysno) { + case __NR_get_robust_list: + case __NR_set_robust_list: + case __NR_futex: ++#if defined(__NR_futex_time64) ++ case __NR_futex_time64: ++#endif + default: + return false; + }