From 3ecbefb9fa30f1cf2c0c445c5248f1c30b9f202030153ad59960e2b22b2c264e Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Tue, 1 Oct 2024 17:50:13 +0000 Subject: [PATCH] Qt 6.7.3 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/qt6-webengine?expand=0&rev=72 --- .gitattributes | 23 + .gitignore | 1 + _constraints | 42 ++ _multibuild | 3 + qt6-webengine-rpmlintrc | 8 + qt6-webengine.changes | 301 +++++++++++++ qt6-webengine.spec | 557 +++++++++++++++++++++++ qtwebengine-everywhere-src-6.7.2.tar.xz | 3 + qtwebengine-everywhere-src-6.7.3.tar.xz | 3 + qtwebengine-ffmpeg-7.patch | 574 ++++++++++++++++++++++++ rtc-dont-use-h264.patch | 23 + 11 files changed, 1538 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _constraints create mode 100644 _multibuild create mode 100644 qt6-webengine-rpmlintrc create mode 100644 qt6-webengine.changes create mode 100644 qt6-webengine.spec create mode 100644 qtwebengine-everywhere-src-6.7.2.tar.xz create mode 100644 qtwebengine-everywhere-src-6.7.3.tar.xz create mode 100644 qtwebengine-ffmpeg-7.patch create mode 100644 rtc-dont-use-h264.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/_constraints b/_constraints new file mode 100644 index 0000000..b8c5b7c --- /dev/null +++ b/_constraints @@ -0,0 +1,42 @@ + + + + qt6-webengine + + + + 16 + + + 20 + + + 8 + + 8 + + + + + aarch64 + + + + 16 + + + + + + qt6-webengine:docs + + + + 7 + + + 2 + + + + diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..ffb9d48 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + docs + diff --git a/qt6-webengine-rpmlintrc b/qt6-webengine-rpmlintrc new file mode 100644 index 0000000..1d8396c --- /dev/null +++ b/qt6-webengine-rpmlintrc @@ -0,0 +1,8 @@ +# using fdupes on include directories means looking for troubles +addFilter("files-duplicate .*") + +# library and development package names don't match +addFilter("no-dependency-on .*") + +# Only libraries used at link time are guaranteed to work +addFilter("shlib-fixed-dependency .*") diff --git a/qt6-webengine.changes b/qt6-webengine.changes new file mode 100644 index 0000000..b56a0d9 --- /dev/null +++ b/qt6-webengine.changes @@ -0,0 +1,301 @@ +------------------------------------------------------------------- +Sat Sep 28 08:23:12 UTC 2024 - Christophe Marin + +- Update to 6.7.3 + * https://www.qt.io/blog/qt-6.7.3-released + +------------------------------------------------------------------- +Wed Aug 7 12:39:11 UTC 2024 - Christophe Marin + +- Add patch to build qtwebengine with ffmpeg 7 (picked from Arch) + * qtwebengine-ffmpeg-7.patch + +------------------------------------------------------------------- +Wed Jun 19 07:26:07 UTC 2024 - Christophe Marin + +- Update to 6.7.2: + * https://www.qt.io/blog/qt-6.7.2-released + +------------------------------------------------------------------- +Tue May 21 08:31:53 UTC 2024 - Christophe Marin + +- Update to 6.7.1: + * https://www.qt.io/blog/qt-6.7.1-released +- Drop patch, merged upstream: + * Add-missing-dependencies.patch + +------------------------------------------------------------------- +Wed May 15 19:16:46 UTC 2024 - Christoph G + +- Backport Ninja 1.12 compatibility patch (and adjust paths) + Add-missing-dependencies.patch from upstream + +------------------------------------------------------------------- +Tue Apr 2 13:40:04 UTC 2024 - Christophe Marin + +- Update to 6.7.0: + * https://www.qt.io/blog/qt-6.7-released +- Update rtc-dont-use-h264.patch + +------------------------------------------------------------------- +Tue Mar 26 14:27:18 UTC 2024 - Christophe Marin + +- Update to 6.6.3: + * https://www.qt.io/blog/qt-6.6.3-released + +------------------------------------------------------------------- +Wed Feb 14 16:53:38 UTC 2024 - Christophe Marin + +- Update to 6.6.2 + * https://www.qt.io/blog/qt-6.6.2-released +- Drop patch, issue fixed upstream: + * 0001-Fix-race-condition-generating-docs.patch + +------------------------------------------------------------------- +Fri Dec 22 09:57:26 UTC 2023 - Michal Suchanek + +- On Leap build with re2-10 even when re2-11 is available (bsc#1217257). + re2-11 pulls in system abseil which is incompatible with bundled abseil + causing build failure. + +------------------------------------------------------------------- +Wed Dec 20 12:16:07 UTC 2023 - Antonio Larrosa + +- Add patch to force pdf_attributions.qdoc to be generated before + qtpdf, fixing a race condition that made the docs subpackage + build not reproducible (boo#1217774): + * 0001-Fix-race-condition-generating-docs.patch + +------------------------------------------------------------------- +Mon Nov 27 14:00:22 UTC 2023 - Christophe Marin + +- Update to 6.6.1: + * https://www.qt.io/blog/qt-6.6.1-released + +------------------------------------------------------------------- +Tue Oct 10 09:40:03 UTC 2023 - Christophe Marin + +- Update to 6.6.0 + * https://www.qt.io/blog/qt-6.6-released + +------------------------------------------------------------------- +Thu Sep 28 07:34:25 UTC 2023 - Christophe Marin + +- Update to 6.5.3 + * https://www.qt.io/blog/qt-6.5.3-released + +------------------------------------------------------------------- +Tue Aug 8 16:11:11 UTC 2023 - Christophe Marin + +- Build with older re2 release on Tumbleweed. + +------------------------------------------------------------------- +Thu Jul 20 09:07:35 UTC 2023 - Christophe Marin + +- Update to 6.5.2 + * https://www.qt.io/blog/qt-6.5.2-released-1 + +------------------------------------------------------------------- +Fri Jun 30 15:13:17 UTC 2023 - Christophe Marin + +- Update subpackages requirements + +------------------------------------------------------------------- +Wed May 24 07:45:46 UTC 2023 - Christophe Marin + +- Update to 6.5.1 + * https://www.qt.io/blog/qt-6.5.1-released +- Drop patch, merged upstream: + * qtwebengine-gcc13.patch + +------------------------------------------------------------------- +Mon Apr 3 10:03:15 UTC 2023 - Christophe Marin + +- Update to 6.5.0 + * https://www.qt.io/blog/qt-6.5-lts-released + +------------------------------------------------------------------- +Tue Mar 28 22:20:44 UTC 2023 - Christophe Marin + +- Add upstream change: + * qtwebengine-gcc13.patch + +------------------------------------------------------------------- +Thu Mar 16 10:00:12 UTC 2023 - Christophe Marin + +- Update to 6.4.3: + * https://www.qt.io/blog/qt-6.4.3-released + +------------------------------------------------------------------- +Fri Jan 6 16:46:56 UTC 2023 - Christophe Marin + +- Update to 6.4.2: + * https://www.qt.io/blog/qt-6.4.2-released + +------------------------------------------------------------------- +Tue Nov 15 11:53:28 UTC 2022 - Christophe Giboudeaux + +- Update to 6.4.1: + * https://www.qt.io/blog/qt-6.4.1-released + +------------------------------------------------------------------- +Tue Oct 4 19:49:38 UTC 2022 - Andreas Schwab + +- Update disk constraints for qt6-webengine:docs + +------------------------------------------------------------------- +Thu Sep 29 10:36:10 UTC 2022 - Christophe Giboudeaux + +- Update to 6.4.0: + * https://www.qt.io/blog/qt-6.4-released + +------------------------------------------------------------------- +Fri Sep 16 08:29:25 UTC 2022 - Christophe Giboudeaux + +- Update to 6.4.0 RC + +------------------------------------------------------------------- +Fri Sep 9 12:41:52 UTC 2022 - Christophe Giboudeaux + +- Update to 6.3.2: + * https://www.qt.io/blog/qt-6.3.2-released +- Drop disable-gpu-when-using-nouveau-boo-1005323.diff + Patch was not updated for Qt6 + +------------------------------------------------------------------- +Mon Aug 8 12:03:18 UTC 2022 - Stephan Kulow + +- Remove python2 from buildrequires - it's a left over from qt5 + +------------------------------------------------------------------- +Fri Jun 17 15:15:46 UTC 2022 - Christophe Giboudeaux + +- Update to 6.3.1: + * https://www.qt.io/blog/qt-6.3.1-released +- Drop patches, now upstream: + * qtwebengine-icu70.patch + * 0001-Find-GIO-with-QtBase-6.2.patch + +------------------------------------------------------------------- +Fri Apr 8 11:57:03 UTC 2022 - Christophe Giboudeaux + +- Update to 6.3.0: + * https://www.qt.io/blog/qt-6.3-released +- Drop patches, now upstream: + * CVE-2022-0971-qtwebengine-5.15.patch + * CVE-2022-1096-qtwebengine-6.2.patch + +------------------------------------------------------------------- +Mon Apr 4 20:41:16 UTC 2022 - Christophe Giboudeaux + +- Add security fixes: + * CVE-2022-0971-qtwebengine-5.15.patch (CVE-2022-0971, boo#1197163) + * CVE-2022-1096-qtwebengine-6.2.patch (CVE-2022-1096, boo#1197552) + +------------------------------------------------------------------- +Tue Mar 29 12:28:44 UTC 2022 - Christophe Giboudeaux + +- Update to 6.3.0-rc +- Drop patches, fixed upstream: + * Drop sandbox-statx-futex_time64.patch + * 0001-Fix-build-with-glibc-2.34.patch +- Add upstream changes: + * qtwebengine-icu70.patch + * 0001-Find-GIO-with-QtBase-6.2.patch +- Disable build on 32 bits archs (i586, armv7l) + Build fails (QTBUG-102143) and upstream doesn't support 32 bits + archs. + +------------------------------------------------------------------- +Mon Mar 21 08:46:39 UTC 2022 - Christophe Giboudeaux + +- Update to 6.2.4 + * https://www.qt.io/blog/qt-6.2.4-released +- Drop chromium-90-fseal.patch. Not needed anymore. + +------------------------------------------------------------------- +Mon Jan 31 08:55:03 UTC 2022 - Christophe Giboudeaux + +- Update to 6.2.3: + * https://www.qt.io/blog/qt-6.2.3-released + +------------------------------------------------------------------- +Thu Dec 9 11:27:27 UTC 2021 - Guillaume GARDET + +- Update _constraints on arm and set requirements for + qt6-webengine:docs + +------------------------------------------------------------------- +Wed Dec 1 10:06:38 UTC 2021 - Christophe Giboudeaux + +- Update to 6.2.2 + * https://www.qt.io/blog/qt-6.2.2-released +- Make sure all dependencies are present when installing devel + packages. Qt >= 6.2.2 is much less permissive. +- Rebase rtc-dont-use-h264.patch + +------------------------------------------------------------------- +Tue Oct 26 11:23:04 UTC 2021 - Christophe Giboudeaux + +- Update to 6.2.1 + * https://www.qt.io/blog/qt-6.2.1-released + +- Drop openSUSE patch qtwebengine-boo1163766.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 +- Drop upstream changes: + * 0001-Fix-build-when-x11-over-egl-es2.patch + * 0001-return-ENOSYS-for-clone3.patch +- Rebase patches: + * 0001-Fix-build-with-glibc-2.34.patch + * sandbox-statx-futex_time64.patch + +------------------------------------------------------------------- +Thu Sep 30 12:31:00 UTC 2021 - Christophe Giboudeaux + +- Update to 6.2.0: + * https://www.qt.io/blog/qt-6.2-lts-released + +------------------------------------------------------------------- +Sat Sep 25 07:18:46 UTC 2021 - Christophe Giboudeaux + +- Update to 6.2.0-rc2 + +------------------------------------------------------------------- +Thu Sep 16 14:24:30 UTC 2021 - Christophe Giboudeaux + +- Update to 6.2.0-rc +- Add arm build fix: + * 0001-Fix-build-when-x11-over-egl-es2.patch + +------------------------------------------------------------------- +Sat Sep 11 12:47:13 UTC 2021 - Christophe Giboudeaux + +- Update to 6.2.0-beta4 +- Add glibc 2.34 compatibility patch: + * 0001-Fix-build-with-glibc-2.34.patch +- Import patches from the chromium package: + * 0001-return-ENOSYS-for-clone3.patch + * chromium-90-fseal.patch + +------------------------------------------------------------------- +Sun Aug 1 09:41:59 UTC 2021 - Christophe Giboudeaux + +- Drop chromium-glibc-2.33.patch. Merged upstream +- Rebase sandbox-statx-futex_time64.patch. + +------------------------------------------------------------------- +Fri Jul 2 12:22:23 UTC 2021 - Christophe Giboudeaux + +- Add back patches from libqt5-qtwebengine: + * qtwebengine-boo1163766.patch + * rtc-dont-use-h264.patch + * sandbox-statx-futex_time64.patch + * chromium-glibc-2.33.patch + +------------------------------------------------------------------- +Wed Jun 23 19:27:45 UTC 2021 - Christophe Giboudeaux + +- Init qt6-webengine diff --git a/qt6-webengine.spec b/qt6-webengine.spec new file mode 100644 index 0000000..56825f7 --- /dev/null +++ b/qt6-webengine.spec @@ -0,0 +1,557 @@ +# +# spec file for package qt6-webengine +# +# 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/ +# + + +%define real_version 6.7.3 +%define short_version 6.7 +%define tar_name qtwebengine-everywhere-src +%define tar_suffix %{nil} +# +%global qt6_flavor @BUILD_FLAVOR@%{nil} +%define no_flavor ("%qt6_flavor" == "") +# +%if "%{qt6_flavor}" == "docs" +%define pkg_suffix -docs +%endif +# +%if 0%{?suse_version} > 1500 +# The antique version in Leap 15 is too old for building chromium +%bcond_without system_harfbuzz +# The ICU version is also too old incrementExact() appeared in ICU 71 +%bcond_without system_icu +# and so is tiff... +%bcond_without system_tiff +%endif +Name: qt6-webengine%{?pkg_suffix} +Version: 6.7.3 +Release: 0 +Summary: Web browser engine for Qt applications +License: GPL-2.0-only OR LGPL-3.0-only OR GPL-3.0-only +URL: https://www.qt.io +Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz +Source99: qt6-webengine-rpmlintrc +# Patches 0-100 are upstream patches # +# Patches 100-200 are openSUSE and/or non-upstream(able) patches # +Patch100: rtc-dont-use-h264.patch +Patch101: qtwebengine-ffmpeg-7.patch +# +# Chromium/blink don't support PowerPC and zSystems and build fails on +# 32 bits archs (https://bugreports.qt.io/browse/QTBUG-102143) +ExclusiveArch: aarch64 x86_64 %x86_64 riscv64 +BuildRequires: Mesa-KHR-devel +BuildRequires: bison +# Not pulled automatically on Leap +BuildRequires: cups-config +BuildRequires: cups-devel +BuildRequires: flex +BuildRequires: gperf +BuildRequires: krb5-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel >= 1.6.0 +BuildRequires: memory-constraints +BuildRequires: nodejs-default +BuildRequires: pipewire-devel +BuildRequires: pkgconfig +BuildRequires: python3-devel +BuildRequires: python3-html5lib +BuildRequires: python3-importlib-metadata +BuildRequires: qt6-core-private-devel +BuildRequires: qt6-gui-private-devel +BuildRequires: qt6-qml-private-devel +BuildRequires: qt6-quick-private-devel +BuildRequires: qt6-quickwidgets-private-devel +BuildRequires: qt6-widgets-private-devel +BuildRequires: snappy-devel +BuildRequires: cmake(Qt6Core) = %{real_version} +BuildRequires: cmake(Qt6Designer) = %{real_version} +BuildRequires: cmake(Qt6Gui) = %{real_version} +BuildRequires: cmake(Qt6GuiTools) = %{real_version} +BuildRequires: cmake(Qt6Network) = %{real_version} +BuildRequires: cmake(Qt6OpenGL) = %{real_version} +BuildRequires: cmake(Qt6OpenGLWidgets) = %{real_version} +BuildRequires: cmake(Qt6Positioning) = %{real_version} +BuildRequires: cmake(Qt6PrintSupport) = %{real_version} +BuildRequires: cmake(Qt6Qml) = %{real_version} +BuildRequires: cmake(Qt6QmlModels) = %{real_version} +BuildRequires: cmake(Qt6QmlTools) = %{real_version} +BuildRequires: cmake(Qt6Quick) = %{real_version} +BuildRequires: cmake(Qt6QuickControls2) = %{real_version} +BuildRequires: cmake(Qt6QuickTest) = %{real_version} +BuildRequires: cmake(Qt6QuickWidgets) = %{real_version} +BuildRequires: cmake(Qt6WebChannel) = %{real_version} +BuildRequires: cmake(Qt6WebChannelQuick) = %{real_version} +BuildRequires: cmake(Qt6WebSockets) = %{real_version} +BuildRequires: cmake(Qt6Widgets) = %{real_version} +BuildRequires: cmake(Qt6WidgetsTools) = %{real_version} +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(epoxy) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(glib-2.0) >= 2.32.0 +BuildRequires: pkgconfig(glproto) +%if %{with system_harfbuzz} +BuildRequires: pkgconfig(harfbuzz) +%endif +%if %{with system_icu} +BuildRequires: pkgconfig(icu-i18n) >= 71 +BuildRequires: pkgconfig(icu-uc) >= 71 +%endif +BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libevent) +BuildRequires: pkgconfig(libopenjp2) +BuildRequires: pkgconfig(libpci) +BuildRequires: pkgconfig(libpulse) >= 0.9.10 +%if %{with system_tiff} +BuildRequires: pkgconfig(libtiff-4) >= 4.2.0 +%endif +BuildRequires: pkgconfig(libva) +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(libxslt) +BuildRequires: pkgconfig(minizip) +BuildRequires: pkgconfig(nss) >= 3.26 +BuildRequires: pkgconfig(opus) >= 1.3.1 +BuildRequires: pkgconfig(poppler-cpp) +%if 0%{?suse_version} <= 1500 +BuildRequires: pkgconfig(re2) < 11 +%else +BuildRequires: pkgconfig(re2) +%endif +BuildRequires: pkgconfig(vpx) >= 1.10.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(xshmfence) +BuildRequires: pkgconfig(xt) +BuildRequires: pkgconfig(xtst) +BuildRequires: pkgconfig(zlib) +# Picked from chromium.spec +BuildRequires: (python3 >= 3.7 or python3-dataclasses) +%if "%{qt6_flavor}" == "docs" +BuildRequires: qt6-tools +%{qt6_doc_packages} +%endif + +%description +The Qt WebEngine module provides a web browser engine to embed web content into +Qt applications. +The functionality in Qt WebEngine is divided into the following +modules: +* Qt WebEngine Core module for interacting with Chromium +* Qt WebEngine Widgets module for creating widget-based web applications +* Qt WebEngine module for creating Qt Quick based web applications + +%if %{no_flavor} + +%package imports +Summary: Qt 6 WebEngine QML files and plugins + +%description imports +QML files and plugins from the Qt 6 WebEngine module + +%package -n libQt6Pdf6 +Summary: Qt6 Pdf library + +%description -n libQt6Pdf6 +The Qt6 Pdf library. + +%package -n qt6-pdf-imports +Summary: Qt 6 Pdf QML files and plugins + +%description -n qt6-pdf-imports +QML files and plugins from the Qt 6 Pdf module + +%package -n qt6-pdf-devel +Summary: Development files for the Qt 6 Pdf library +Requires: libQt6Pdf6 = %{version} +Requires: cmake(Qt6Gui) = %{real_version} +Requires: cmake(Qt6Network) = %{real_version} + +%description -n qt6-pdf-devel +Development files for the Qt 6 Pdf library. + +%package -n qt6-pdf-private-devel +Summary: Non-ABI stable API for the Qt 6 Pdf library +Requires: cmake(Qt6Pdf) = %{real_version} + +%description -n qt6-pdf-private-devel +This package provides private headers of libQt6Pdf that do not have any +ABI or API guarantees. + +%package -n libQt6PdfQuick6 +Summary: Qt6 PdfQuick library + +%description -n libQt6PdfQuick6 +The Qt6 PdfQuick library. + +%package -n qt6-pdfquick-devel +Summary: Development files for the Qt 6 PdfQuick library +Requires: libQt6PdfQuick6 = %{version} +Requires: qt6-pdf-private-devel = %{version} +Requires: cmake(Qt6Gui) = %{real_version} +Requires: cmake(Qt6Qml) = %{real_version} +Requires: cmake(Qt6Quick) = %{real_version} +%requires_eq qt6-quick-private-devel + +%description -n qt6-pdfquick-devel +Development files for the Qt 6 PdfQuick library. + +%package -n qt6-pdfquick-private-devel +Summary: Non-ABI stable API for the Qt 6 PdfQuick library +Requires: cmake(Qt6PdfQuick) = %{real_version} + +%description -n qt6-pdfquick-private-devel +This package provides private headers of libQt6PdfQuick that do not have any +ABI or API guarantees. + +%package -n libQt6PdfWidgets6 +Summary: Qt6 PdfWidgets library + +%description -n libQt6PdfWidgets6 +The Qt6 PdfWidgets library. + +%package -n qt6-pdfwidgets-devel +Summary: Development files for the Qt 6 PdfWidgets library +Requires: libQt6PdfWidgets6 = %{version} +Requires: cmake(Qt6Gui) = %{real_version} +Requires: cmake(Qt6Pdf) = %{real_version} +Requires: cmake(Qt6Widgets) = %{real_version} + +%description -n qt6-pdfwidgets-devel +Development files for the Qt 6 PdfWidgets library. + +%package -n qt6-pdfwidgets-private-devel +Summary: Non-ABI stable API for the Qt 6 PdfWidgets library +Requires: cmake(Qt6PdfWidgets) = %{real_version} + +%description -n qt6-pdfwidgets-private-devel +This package provides private headers of libQt6PdfWidgets that do not have any +ABI or API guarantees. + +%package -n libQt6WebEngineCore6 +Summary: Qt6 WebEngineCore library +Requires: qt6-webengine = %{version} + +%description -n libQt6WebEngineCore6 +The Qt6 WebEngineCore library. + +%package -n qt6-webenginecore-devel +Summary: Development files for the Qt 6 WebEngineCore library +Requires: libQt6WebEngineCore6 = %{version} +Requires: cmake(Qt6Gui) = %{real_version} +Requires: cmake(Qt6Network) = %{real_version} +Requires: cmake(Qt6Positioning) = %{real_version} +Requires: cmake(Qt6Quick) = %{real_version} +Requires: cmake(Qt6WebChannel) = %{real_version} + +%description -n qt6-webenginecore-devel +Development files for the Qt 6 WebEngineCore library. + +%package -n qt6-webenginecore-private-devel +Summary: Non-ABI stable API for the Qt 6 WebEngineCore library +Requires: cmake(Qt6WebEngineCore) = %{real_version} + +%description -n qt6-webenginecore-private-devel +This package provides private headers of libQt6WebEngineCore that do not have any +ABI or API guarantees. + +%package -n libQt6WebEngineQuick6 +Summary: Qt6 WebEngineQuick library +Requires: qt6-webengine-imports = %{version} + +%description -n libQt6WebEngineQuick6 +The Qt6 WebEngineQuick library. + +%package -n qt6-webenginequick-devel +Summary: Development files for the Qt 6 WebEngineQuick library +Requires: libQt6WebEngineQuick6 = %{version} +Requires: cmake(Qt6Gui) = %{real_version} +Requires: cmake(Qt6Qml) = %{real_version} +Requires: cmake(Qt6Quick) = %{real_version} +Requires: cmake(Qt6WebChannelQuick) = %{real_version} +Requires: cmake(Qt6WebEngineCore) = %{real_version} + +%description -n qt6-webenginequick-devel +Development files for the Qt 6 WebEngineQuick library. + +%package -n qt6-webenginequick-private-devel +Summary: Non-ABI stable API for the Qt 6 WebEngineQuick library +Requires: cmake(Qt6WebEngineQuick) = %{real_version} + +%description -n qt6-webenginequick-private-devel +This package provides private headers of libQt6WebEngineQuick that do not have any +ABI or API guarantees. + +%package -n libQt6WebEngineWidgets6 +Summary: Qt6 WebEngineWidgets library + +%description -n libQt6WebEngineWidgets6 +The Qt6 WebEngineWidgets library. + +%package -n qt6-webenginewidgets-devel +Summary: Development files for the Qt 6 WebEngineWidgets library +Requires: libQt6WebEngineWidgets6 = %{version} +Requires: cmake(Qt6Gui) = %{real_version} +Requires: cmake(Qt6PrintSupport) = %{real_version} +Requires: cmake(Qt6Quick) = %{real_version} +Requires: cmake(Qt6QuickWidgets) = %{real_version} +Requires: cmake(Qt6WebEngineCore) = %{real_version} +Requires: cmake(Qt6Widgets) = %{real_version} + +%description -n qt6-webenginewidgets-devel +Development files for the Qt 6 WebEngineWidgets library. + +%package -n qt6-webenginewidgets-private-devel +Summary: Non-ABI stable API for the Qt 6 WebEngineWidgets library +Requires: cmake(Qt6WebEngineWidgets) = %{real_version} + +%description -n qt6-webenginewidgets-private-devel +This package provides private headers of libQt6WebEngineWidgets that do not have any +ABI or API guarantees. + +%{qt6_examples_package} + +%endif + +%prep +%autosetup -p1 -n %{tar_name}-%{real_version}%{tar_suffix} + +%if %{pkg_vcmp pkgconfig(libavcodec) <= 5} +# The ffmpeg 7 compatibility patch would break build with older ffmpeg +%patch -P101 -p1 -R +%endif + +%build +%if %{no_flavor} +# Determine the right number of parallel processes based on the available memory +# Copied from the Qt 5 webengine package +%limit_build -m 2750 +%endif + +# Ensure that also the internal chromium build follows the right number of +# parallel processes instead of its defaults. +export NINJAFLAGS="%{?_smp_mflags}" + +%cmake_qt6 \ + -DCMAKE_TOOLCHAIN_FILE:STRING="%{_qt6_cmakedir}/Qt6/qt.toolchain.cmake" \ + -DFEATURE_qtpdf_build:BOOL=ON \ + -DFEATURE_webengine_developer_build:BOOL=OFF \ + -DFEATURE_webengine_embedded_build:BOOL=OFF \ + -DFEATURE_webengine_extensions:BOOL=ON \ + -DFEATURE_webengine_kerberos:BOOL=ON \ + -DFEATURE_webengine_native_spellchecker:BOOL=OFF \ + -DFEATURE_webengine_printing_and_pdf:BOOL=ON \ + -DFEATURE_webengine_proprietary_codecs:BOOL=ON \ + -DFEATURE_webengine_system_ffmpeg:BOOL=ON \ +%if %{without system_harfbuzz} + -DFEATURE_webengine-system-harfbuzz:BOOL=OFF \ +%endif +%if %{with system_icu} + -DFEATURE_webengine_system_icu:BOOL=ON \ +%else + -DFEATURE_webengine_system_icu:BOOL=OFF \ +%endif + -DFEATURE_webengine_system_libevent:BOOL=ON \ + -DFEATURE_webengine_webrtc:BOOL=ON \ + -DFEATURE_webengine_webrtc_pipewire:BOOL=ON \ + -DQT_BUILD_EXAMPLES:BOOL=ON + +%{qt6_build} + +%install +%{qt6_install} + +%if %{no_flavor} + +# CMake files are not needed for plugins +rm -r %{buildroot}%{_qt6_cmakedir}/Qt6Designer/ +rm -r %{buildroot}%{_qt6_cmakedir}/Qt6Gui/ +rm -r %{buildroot}%{_qt6_cmakedir}/Qt6Qml/QmlPlugins + +# This shouldn't be needed +rm -r %{buildroot}%{_qt6_cmakedir}/Qt6BuildInternals + +%ldconfig_scriptlets -n libQt6Pdf6 +%ldconfig_scriptlets -n libQt6PdfQuick6 +%ldconfig_scriptlets -n libQt6PdfWidgets6 +%ldconfig_scriptlets -n libQt6WebEngineCore6 +%ldconfig_scriptlets -n libQt6WebEngineQuick6 +%ldconfig_scriptlets -n libQt6WebEngineWidgets6 + +%files +%dir %{_qt6_pluginsdir}/designer +%{_qt6_datadir}/resources/ +%{_qt6_translationsdir}/qtwebengine_locales/ +%{_qt6_libexecdir}/QtWebEngineProcess +%{_qt6_libexecdir}/webenginedriver +%{_qt6_pluginsdir}/designer/libqwebengineview.so + +%files imports +%{_qt6_qmldir}/QtWebEngine/ + +%files -n libQt6Pdf6 +%dir %{_qt6_pluginsdir}/imageformats +%{_qt6_libdir}/libQt6Pdf.so.* +%{_qt6_pluginsdir}/imageformats/libqpdf.so + +%files -n qt6-pdf-imports +%dir %{_qt6_qmldir}/QtQuick +%{_qt6_qmldir}/QtQuick/Pdf + +%files -n qt6-pdf-devel +%{_qt6_cmakedir}/Qt6Pdf/ +%{_qt6_descriptionsdir}/Pdf.json +%{_qt6_includedir}/QtPdf/ +%{_qt6_libdir}/libQt6Pdf.prl +%{_qt6_libdir}/libQt6Pdf.so +%{_qt6_metatypesdir}/qt6pdf_*_metatypes.json +%{_qt6_mkspecsdir}/modules/qt_lib_pdf.pri +%{_qt6_pkgconfigdir}/Qt6Pdf.pc +%exclude %{_qt6_includedir}/QtPdf/%{real_version} + +%files -n qt6-pdf-private-devel +%{_qt6_includedir}/QtPdf/%{real_version}/ +%{_qt6_mkspecsdir}/modules/qt_lib_pdf_private.pri + +%files -n libQt6PdfQuick6 +%{_qt6_libdir}/libQt6PdfQuick.so.* + +%files -n qt6-pdfquick-devel +%{_qt6_cmakedir}/Qt6PdfQuick/ +%{_qt6_descriptionsdir}/PdfQuick.json +%{_qt6_includedir}/QtPdfQuick/ +%{_qt6_libdir}/libQt6PdfQuick.prl +%{_qt6_libdir}/libQt6PdfQuick.so +%{_qt6_metatypesdir}/qt6pdfquick_*_metatypes.json +%{_qt6_mkspecsdir}/modules/qt_lib_pdfquick.pri +%{_qt6_pkgconfigdir}/Qt6PdfQuick.pc +%exclude %{_qt6_includedir}/QtPdfQuick/%{real_version} + +%files -n qt6-pdfquick-private-devel +%{_qt6_includedir}/QtPdfQuick/%{real_version}/ +%{_qt6_mkspecsdir}/modules/qt_lib_pdfquick_private.pri + +%files -n libQt6PdfWidgets6 +%{_qt6_libdir}/libQt6PdfWidgets.so.* + +%files -n qt6-pdfwidgets-devel +%{_qt6_cmakedir}/Qt6PdfWidgets/ +%{_qt6_descriptionsdir}/PdfWidgets.json +%{_qt6_includedir}/QtPdfWidgets/ +%{_qt6_libdir}/libQt6PdfWidgets.prl +%{_qt6_libdir}/libQt6PdfWidgets.so +%{_qt6_metatypesdir}/qt6pdfwidgets_*_metatypes.json +%{_qt6_mkspecsdir}/modules/qt_lib_pdfwidgets.pri +%{_qt6_pkgconfigdir}/Qt6PdfWidgets.pc +%exclude %{_qt6_includedir}/QtPdfWidgets/%{real_version} + +%files -n qt6-pdfwidgets-private-devel +%{_qt6_includedir}/QtPdfWidgets/%{real_version}/ +%{_qt6_mkspecsdir}/modules/qt_lib_pdfwidgets_private.pri + +%files -n libQt6WebEngineCore6 +%license LICENSES/* +%{_qt6_libdir}/libQt6WebEngineCore.so.* + +%files -n qt6-webenginecore-devel +%{_qt6_cmakedir}/Qt6/FindGPerf.cmake +%{_qt6_cmakedir}/Qt6/FindGn.cmake +%{_qt6_cmakedir}/Qt6/FindNinja.cmake +%{_qt6_cmakedir}/Qt6/FindNodejs.cmake +%{_qt6_cmakedir}/Qt6/FindPkgConfigHost.cmake +%{_qt6_cmakedir}/Qt6/FindSnappy.cmake +%{_qt6_cmakedir}/Qt6WebEngineCore/ +%{_qt6_cmakedir}/Qt6WebEngineCoreTools/ +%{_qt6_descriptionsdir}/WebEngineCore.json +%{_qt6_includedir}/QtWebEngineCore/ +%{_qt6_libdir}/libQt6WebEngineCore.prl +%{_qt6_libdir}/libQt6WebEngineCore.so +%{_qt6_libexecdir}/gn +%{_qt6_libexecdir}/qwebengine_convert_dict +%{_qt6_metatypesdir}/qt6webenginecore_*_metatypes.json +%{_qt6_mkspecsdir}/modules/qt_lib_webenginecore.pri +%{_qt6_pkgconfigdir}/Qt6WebEngineCore.pc +%exclude %{_qt6_includedir}/QtWebEngineCore/%{real_version} + +%files -n qt6-webenginecore-private-devel +%{_qt6_includedir}/QtWebEngineCore/%{real_version}/ +%{_qt6_mkspecsdir}/modules/qt_lib_webenginecore_private.pri + +%files -n libQt6WebEngineQuick6 +%{_qt6_libdir}/libQt6WebEngineQuick.so.* +%{_qt6_libdir}/libQt6WebEngineQuickDelegatesQml.so.* + +%files -n qt6-webenginequick-devel +%{_qt6_cmakedir}/Qt6WebEngineQuick/ +%{_qt6_cmakedir}/Qt6WebEngineQuickDelegatesQml/ +%{_qt6_descriptionsdir}/WebEngineQuick.json +%{_qt6_descriptionsdir}/WebEngineQuickDelegatesQml.json +%{_qt6_includedir}/QtWebEngineQuick/ +%{_qt6_libdir}/libQt6WebEngineQuick.prl +%{_qt6_libdir}/libQt6WebEngineQuick.so +%{_qt6_libdir}/libQt6WebEngineQuickDelegatesQml.prl +%{_qt6_libdir}/libQt6WebEngineQuickDelegatesQml.so +%{_qt6_metatypesdir}/qt6webenginequick_*_metatypes.json +%{_qt6_metatypesdir}/qt6webenginequickdelegatesqml_*_metatypes.json +%{_qt6_mkspecsdir}/modules/qt_lib_webenginequick.pri +%{_qt6_mkspecsdir}/modules/qt_lib_webenginequickdelegatesqml.pri +%{_qt6_pkgconfigdir}/Qt6WebEngineQuick.pc +%{_qt6_pkgconfigdir}/Qt6WebEngineQuickDelegatesQml.pc +%exclude %{_qt6_includedir}/QtWebEngineQuick/%{real_version} + +%files -n qt6-webenginequick-private-devel +%{_qt6_includedir}/QtWebEngineQuick/%{real_version}/ +%{_qt6_mkspecsdir}/modules/qt_lib_webenginequick_private.pri +%{_qt6_mkspecsdir}/modules/qt_lib_webenginequickdelegatesqml_private.pri + +%files -n libQt6WebEngineWidgets6 +%{_qt6_libdir}/libQt6WebEngineWidgets.so.* + +%files -n qt6-webenginewidgets-devel +%{_qt6_cmakedir}/Qt6WebEngineWidgets/ +%{_qt6_descriptionsdir}/WebEngineWidgets.json +%{_qt6_includedir}/QtWebEngineWidgets/ +%{_qt6_libdir}/libQt6WebEngineWidgets.prl +%{_qt6_libdir}/libQt6WebEngineWidgets.so +%{_qt6_metatypesdir}/qt6webenginewidgets_*_metatypes.json +%{_qt6_mkspecsdir}/modules/qt_lib_webenginewidgets.pri +%{_qt6_pkgconfigdir}/Qt6WebEngineWidgets.pc +%exclude %{_qt6_includedir}/QtWebEngineWidgets/%{real_version} + +%files -n qt6-webenginewidgets-private-devel +%{_qt6_includedir}/QtWebEngineWidgets/%{real_version}/ +%{_qt6_mkspecsdir}/modules/qt_lib_webenginewidgets_private.pri + +%endif + +%changelog diff --git a/qtwebengine-everywhere-src-6.7.2.tar.xz b/qtwebengine-everywhere-src-6.7.2.tar.xz new file mode 100644 index 0000000..a7294ac --- /dev/null +++ b/qtwebengine-everywhere-src-6.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7755875594d8be382b07bf3634d44fd77012805794d8b588891709a6405ffd1 +size 550888844 diff --git a/qtwebengine-everywhere-src-6.7.3.tar.xz b/qtwebengine-everywhere-src-6.7.3.tar.xz new file mode 100644 index 0000000..418c41e --- /dev/null +++ b/qtwebengine-everywhere-src-6.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c22b159cbb80dc569ce907ea26cc53687873f5e804dab142db54662589d846db +size 550988288 diff --git a/qtwebengine-ffmpeg-7.patch b/qtwebengine-ffmpeg-7.patch new file mode 100644 index 0000000..e4499ef --- /dev/null +++ b/qtwebengine-ffmpeg-7.patch @@ -0,0 +1,574 @@ +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 c535d2b..62ddbc8 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 +@@ -74,7 +74,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) { +@@ -124,8 +124,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; +@@ -185,13 +185,14 @@ bool FFmpegCdmAudioDecoder::Initialize( + // Success! + decoding_loop_ = std::make_unique(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_ = + std::make_unique(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; +@@ -291,7 +292,8 @@ 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_ +@@ -302,7 +304,7 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer( + } + + 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; +@@ -322,7 +324,7 @@ bool FFmpegCdmAudioDecoder::OnNewFrame( + std::vector>* audio_frames, + AVFrame* frame) { + *total_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); + audio_frames->emplace_back(av_frame_clone(frame)); + return true; +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +index 2665355..910f9ad 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -336,10 +336,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); + + switch (codec) { + // For AC3/EAC3 we enable only demuxing, but not decoding, so FFmpeg does +@@ -391,7 +392,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 +@@ -460,7 +461,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 777eabc..2b58dd7 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -113,14 +113,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; +@@ -223,7 +224,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 76b41aa..e26b6cd 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 3b46f7f..1897eb0 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 +@@ -34,7 +34,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 bf3ed00..d564ee9 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -29,7 +29,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 +@@ -243,7 +243,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; +@@ -360,11 +360,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_ = DecoderState::kUninitialized; + return false; +@@ -415,7 +415,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); + } +@@ -448,7 +448,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 910f9ad..8be165c 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -411,7 +411,9 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + + // TODO(dalecurtis): Just use the profile from the codec context if ffmpeg + // ever starts supporting xHE-AAC. +- if (codec_context->profile == FF_PROFILE_UNKNOWN) { ++ constexpr uint8_t kXHEAAc = 41; ++ if (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 05dcb1c..866f446 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc +@@ -90,16 +90,16 @@ FFMPEG_TEST_CASE(Cr62127, + PIPELINE_ERROR_DECODE, + PIPELINE_ERROR_DECODE); + 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, +@@ -154,7 +154,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, +@@ -372,8 +375,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_decoder_unittest.cc b/src/3rdparty/chromium/media/filters/audio_decoder_unittest.cc +index a7b2533..ba3c308 100644 +--- a/src/3rdparty/chromium/media/filters/audio_decoder_unittest.cc ++++ b/src/3rdparty/chromium/media/filters/audio_decoder_unittest.cc +@@ -484,7 +484,7 @@ constexpr TestParams kXheAacTestParams[] = { + }}, + 0, + 29400, +- CHANNEL_LAYOUT_MONO, ++ CHANNEL_LAYOUT_UNSUPPORTED, + AudioCodecProfile::kXHE_AAC}, + #endif + {AudioCodec::kAAC, +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index 2b58dd7..9d37f32 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -243,18 +243,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 BUILDFLAG(USE_SYSTEM_FFMPEG) +- if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) { +-#else + if (audio_codec_ == AudioCodec::kAAC && frame->duration) { +-#endif // BUILDFLAG(USE_SYSTEM_FFMPEG) + const base::TimeDelta pkt_duration = ConvertFromTimeBase( + glue_->format_context()->streams[stream_index_]->time_base, +-#if BUILDFLAG(USE_SYSTEM_FFMPEG) +- frame->pkt_duration + std::min(static_cast(0), frame->pts)); +-#else + frame->duration + std::min(static_cast(0), frame->pts)); +-#endif // BUILDFLAG(USE_SYSTEM_FFMPEG) + const base::TimeDelta frame_duration = + base::Seconds(frames_read / static_cast(sample_rate_)); + +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc b/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc +index a1c633d..5784fe1 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc +@@ -61,15 +61,14 @@ class AudioFileReaderTest : public testing::Test { + // Verify packets are consistent across demuxer runs. Reads the first few + // packets and then seeks back to the start timestamp and verifies that the + // hashes match on the packets just read. +- void VerifyPackets() { +- const int kReads = 3; ++ void VerifyPackets(int packet_reads) { + const int kTestPasses = 2; + + AVPacket packet; + base::TimeDelta start_timestamp; + std::vector packet_md5_hashes_; + for (int i = 0; i < kTestPasses; ++i) { +- for (int j = 0; j < kReads; ++j) { ++ for (int j = 0; j < packet_reads; ++j) { + ASSERT_TRUE(reader_->ReadPacketForTesting(&packet)); + + // On the first pass save the MD5 hash of each packet, on subsequent +@@ -98,7 +97,8 @@ class AudioFileReaderTest : public testing::Test { + int sample_rate, + base::TimeDelta duration, + int frames, +- int expected_frames) { ++ int expected_frames, ++ int packet_reads = 3) { + Initialize(fn); + ASSERT_TRUE(reader_->Open()); + EXPECT_EQ(channels, reader_->channels()); +@@ -112,7 +112,7 @@ class AudioFileReaderTest : public testing::Test { + EXPECT_EQ(reader_->HasKnownDuration(), false); + } + if (!packet_verification_disabled_) +- ASSERT_NO_FATAL_FAILURE(VerifyPackets()); ++ ASSERT_NO_FATAL_FAILURE(VerifyPackets(packet_reads)); + ReadAndVerify(hash, expected_frames); + } + +@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) { + } + + TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) { +- RunTestFailingDecode("midstream_config_change.mp3", 42624); ++ RunTestFailingDecode("midstream_config_change.mp3", 0); + } + #endif + +@@ -229,7 +229,7 @@ TEST_F(AudioFileReaderTest, VorbisInvalidChannelLayout) { + + TEST_F(AudioFileReaderTest, WaveValidFourChannelLayout) { + RunTest("4ch.wav", "131.71,38.02,130.31,44.89,135.98,42.52,", 4, 44100, +- base::Microseconds(100001), 4411, 4410); ++ base::Microseconds(100001), 4411, 4410, /*packet_reads=*/2); + } + + TEST_F(AudioFileReaderTest, ReadPartialMP3) { +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +index e62b2af..ab39796 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -125,7 +125,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) { + } + + FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log) +- : media_log_(media_log) { ++ : media_log_(media_log), timestamp_map_(128) { + DVLOG(1) << __func__; + DETACH_FROM_SEQUENCE(sequence_checker_); + } +@@ -204,10 +204,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context, + frame->linesize[plane] = layout->planes()[plane].stride; + } + +- // This seems unsafe, given threaded decoding. However, `reordered_opaque` is +- // also going away upstream, so we need a whole new mechanism either way. +- frame->reordered_opaque = codec_context->reordered_opaque; +- + // This will be freed by `ReleaseVideoBufferImpl`. + auto* opaque = new OpaqueData(fb_priv, frame_pool_, data, allocation_size, + std::move(*layout)); +@@ -354,8 +350,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(std::make_pair(timestamp_id, timestamp)); ++ packet->opaque = reinterpret_cast(timestamp_id.GetUnsafeValue()); + } + FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket( + packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame, +@@ -414,7 +412,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) { + } + gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect); + +- const auto pts = base::Microseconds(frame->reordered_opaque); ++ 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; ++ } ++ const auto pts = base::Microseconds(std::get<1>(*ts_lookup)); + auto video_frame = VideoFrame::WrapExternalDataWithLayout( + opaque->layout, visible_rect, natural_size, opaque->data, opaque->size, + pts); +@@ -489,8 +492,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 60cb9d5..4fa8628 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h +@@ -7,10 +7,12 @@ + + #include + ++#include "base/containers/lru_cache.h" + #include "base/functional/callback.h" + #include "base/memory/raw_ptr.h" + #include "base/memory/scoped_refptr.h" + #include "base/sequence_checker.h" ++#include "base/types/id_type.h" + #include "media/base/supported_video_decoder_config.h" + #include "media/base/video_decoder.h" + #include "media/base/video_decoder_config.h" +@@ -87,6 +89,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 = base::IdType; ++ ++ TimestampId::Generator timestamp_id_generator_; ++ base::LRUCache timestamp_map_; ++ + VideoDecoderConfig config_; + + scoped_refptr 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 f67718c..fe42aef 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 +@@ -229,7 +229,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; + + // Create a VideoFrame object, to keep a reference to the buffer. + // TODO(nisse): The VideoFrame's timestamp and rotation info is not used. +@@ -377,8 +376,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.get()); + +@@ -395,10 +392,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, + return WEBRTC_VIDEO_CODEC_ERROR; + } + +- // We don't expect reordering. Decoded frame timestamp should match +- // the input one. +- RTC_DCHECK_EQ(av_frame_->reordered_opaque, frame_timestamp_us); +- + // TODO(sakal): Maybe it is possible to get QP directly from FFmpeg. + h264_bitstream_parser_.ParseBitstream(input_image); + absl::optional qp = h264_bitstream_parser_.GetLastSliceQp(); diff --git a/rtc-dont-use-h264.patch b/rtc-dont-use-h264.patch new file mode 100644 index 0000000..26bf614 --- /dev/null +++ b/rtc-dont-use-h264.patch @@ -0,0 +1,23 @@ +From: Fabian Vogt +Subject: Don't require open264 when proprietary_codecs are supported + +Amended on 2024-01-30: also disable h265 + +diff --git a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni +index 5a1c43c8888..d867f7e5330 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni ++++ b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni +@@ -186,11 +186,10 @@ 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 to use H265 +- rtc_use_h265 = proprietary_codecs ++ rtc_use_h265 = false + + # Enable this flag to make webrtc::Mutex be implemented by absl::Mutex. + rtc_use_absl_mutex = false