forked from pool/libqt5-qtwebengine
- 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
This commit is contained in:
commit
1ae5c7869e
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
@ -0,0 +1,35 @@
|
|||||||
|
From 1b74bce8ba1322d1853c7fd4467504a4a0d32d7b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Klein <adamk@chromium.org>
|
||||||
|
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 <adamk@chromium.org>
|
||||||
|
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
|
||||||
|
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
|
||||||
|
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<Rule> rules) { *this = rules; }
|
||||||
|
|
||||||
|
V8_EXPORT_PRIVATE Symbol& operator=(std::initializer_list<Rule> rules);
|
||||||
|
--
|
||||||
|
2.45.1
|
||||||
|
|
27
0001-skia-Some-includes-to-fix-build-with-GCC-12.patch
Normal file
27
0001-skia-Some-includes-to-fix-build-with-GCC-12.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 68799a1e0815b20ca59ce354a55280399257a201 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabian Vogt <fvogt@suse.de>
|
||||||
|
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 <array>
|
||||||
|
+
|
||||||
|
/** \file SkColor.h
|
||||||
|
|
||||||
|
Types, consts, functions, and macros for colors.
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
12
Add-missing-dependencies.patch
Normal file
12
Add-missing-dependencies.patch
Normal file
@ -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",
|
28
_constraints
Normal file
28
_constraints
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<constraints>
|
||||||
|
<hardware>
|
||||||
|
<disk>
|
||||||
|
<size unit="G">12</size>
|
||||||
|
</disk>
|
||||||
|
<memory>
|
||||||
|
<size unit="G">14</size>
|
||||||
|
</memory>
|
||||||
|
<physicalmemory>
|
||||||
|
<size unit="G">12</size>
|
||||||
|
</physicalmemory>
|
||||||
|
<processors>4</processors>
|
||||||
|
</hardware>
|
||||||
|
<overwrite>
|
||||||
|
<conditions>
|
||||||
|
<arch>armv6l</arch>
|
||||||
|
<arch>armv7l</arch>
|
||||||
|
</conditions>
|
||||||
|
<hardware>
|
||||||
|
<memory>
|
||||||
|
<size unit="G">9</size>
|
||||||
|
</memory>
|
||||||
|
<physicalmemory>
|
||||||
|
<size unit="G">8</size>
|
||||||
|
</physicalmemory>
|
||||||
|
</hardware>
|
||||||
|
</overwrite>
|
||||||
|
</constraints>
|
14
_service
Normal file
14
_service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<param name="changesgenerate">enable</param>
|
||||||
|
<param name="version">5.15.17</param>
|
||||||
|
<param name="url">git://code.qt.io/qt/qtwebengine.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="filename">qtwebengine-everywhere-src</param>
|
||||||
|
<param name="revision">v5.15.17-lts</param>
|
||||||
|
</service>
|
||||||
|
<service name="recompress" mode="disabled">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<servicedata>
|
||||||
|
<service name="tar_scm">
|
||||||
|
<param name="url">git://code.qt.io/qt/qtwebengine.git</param>
|
||||||
|
<param name="changesrevision">17fd3176988586168bee8654008a097a5f23ec1d</param></service></servicedata>
|
13
armv6-ffmpeg-no-thumb.patch
Normal file
13
armv6-ffmpeg-no-thumb.patch
Normal file
@ -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
|
94
disable-gpu-when-using-nouveau-boo-1005323.diff
Normal file
94
disable-gpu-when-using-nouveau-boo-1005323.diff
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
From: Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
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 <QOffscreenSurface>
|
||||||
|
#if QT_CONFIG(opengl)
|
||||||
|
# include <QOpenGLContext>
|
||||||
|
+# include <QOpenGLFunctions>
|
||||||
|
#endif
|
||||||
|
#include <QQuickWindow>
|
||||||
|
#include <QStringList>
|
||||||
|
@@ -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<QOffscreenSurface> 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<const char *>(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.
|
2
libqt5-qtwebengine-rpmlintrc
Normal file
2
libqt5-qtwebengine-rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Silence rpmlint error. The libraries SONAME won't change
|
||||||
|
addFilter("shlib-policy-name-error .*")
|
1959
libqt5-qtwebengine.changes
Normal file
1959
libqt5-qtwebengine.changes
Normal file
File diff suppressed because it is too large
Load Diff
500
libqt5-qtwebengine.spec
Normal file
500
libqt5-qtwebengine.spec
Normal file
@ -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
|
493
qt5-webengine-ffmpeg7.patch
Normal file
493
qt5-webengine-ffmpeg7.patch
Normal file
@ -0,0 +1,493 @@
|
|||||||
|
From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dale Curtis <dalecurtis@chromium.org>
|
||||||
|
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 <dalecurtis@chromium.org>
|
||||||
|
Reviewed-by: Dan Sanders <sandersd@chromium.org>
|
||||||
|
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
|
||||||
|
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<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* 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 <tmathmeyer@chromium.org>
|
||||||
|
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 <tmathmeyer@chromium.org>
|
||||||
|
Reviewed-by: Dan Sanders <sandersd@chromium.org>
|
||||||
|
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<int64_t>(0), frame->pts));
|
||||||
|
+ frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
|
||||||
|
const base::TimeDelta frame_duration = base::TimeDelta::FromSecondsD(
|
||||||
|
frames_read / static_cast<double>(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<void*>(timestamp_id.GetUnsafeValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (decoding_loop_->DecodePacket(
|
||||||
|
@@ -358,8 +359,13 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
|
||||||
|
|
||||||
|
scoped_refptr<VideoFrame> video_frame =
|
||||||
|
reinterpret_cast<VideoFrame*>(av_buffer_get_opaque(frame->buf[0]));
|
||||||
|
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(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 <list>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
+#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<AVCodecContext, ScopedPtrAVFreeContext> 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<int64_t, size_t, 0>;
|
||||||
|
+
|
||||||
|
+ TimestampId::Generator timestamp_id_generator_;
|
||||||
|
+ base::MRUCache<TimestampId, int64_t> 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<int>(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<uint8_t> qp;
|
||||||
|
// TODO(sakal): Maybe it is possible to get QP directly from FFmpeg.
|
||||||
|
h264_bitstream_parser_.ParseBitstream(input_image.data(), input_image.size());
|
102
qt5-webengine-icu-75.patch
Normal file
102
qt5-webengine-icu-75.patch
Normal file
@ -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 <cstdint>
|
||||||
|
|
||||||
|
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 <cstdint>
|
||||||
|
|
||||||
|
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 <array>
|
||||||
|
#include <vector>
|
||||||
|
+#include <memory>
|
||||||
|
|
||||||
|
#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 <limits>
|
||||||
|
+#include <cstdint>
|
||||||
|
|
||||||
|
#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
|
BIN
qtwebengine-everywhere-src-5.15.17.tar.xz
(Stored with Git LFS)
Normal file
BIN
qtwebengine-everywhere-src-5.15.17.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
153
qtwebengine-ffmpeg5.patch
Normal file
153
qtwebengine-ffmpeg5.patch
Normal file
@ -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 <libavformat/avformat.h>
|
||||||
|
#include <libavformat/avio.h>
|
||||||
|
#include <libavutil/avutil.h>
|
||||||
|
+#include <libavutil/channel_layout.h>
|
||||||
|
#include <libavutil/imgutils.h>
|
||||||
|
#include <libavutil/log.h>
|
||||||
|
#include <libavutil/mastering_display_metadata.h>
|
||||||
|
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<DecoderBuffer> 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<const uint32_t*>(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<FFmpegDecodingLoop>(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.
|
1764
qtwebengine-pipewire-0.3.patch
Normal file
1764
qtwebengine-pipewire-0.3.patch
Normal file
File diff suppressed because it is too large
Load Diff
32
rtc-dont-use-h264.patch
Normal file
32
rtc-dont-use-h264.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
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
|
||||||
|
}
|
53
sandbox_futex_time64.patch
Normal file
53
sandbox_futex_time64.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 6abdfb1d7638c787081d16bb90022cde7a86309f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matthew Denton <mpdenton@chromium.org>
|
||||||
|
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 <mpdenton@chromium.org>
|
||||||
|
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
||||||
|
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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user