- Fix FTBFS on aarch64 - error: use of undeclared identifier 'kV4L2FlatStatefulVideoDecoder'

- Fix FTBFS on aarch64 - error: no member named 'Contains' in namespace 'base'
epel8
Than Ngo 1 year ago
parent 1579239c98
commit 7e71540a5e

@ -0,0 +1,30 @@
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index bb0122ffd72d4..9262cc744582f 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -807,7 +807,7 @@ BASE_FEATURE(kVaapiVp9kSVCHWEncoding,
"VaapiVp9kSVCHWEncoding",
base::FEATURE_ENABLED_BY_DEFAULT);
#endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
-#if defined(ARCH_CPU_ARM_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
// Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder.
BASE_FEATURE(kV4L2FlatStatelessVideoDecoder,
"V4L2FlatStatelessVideoDecoder",
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index 97d9602eee49e..aacfac69fae20 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -318,10 +318,10 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLayerHWEncoding);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9kSVCHWEncoding);
#endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
-#if defined(ARCH_CPU_ARM_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder);
-#endif // defined(ARCH_CPU_ARM_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy);
#if BUILDFLAG(IS_APPLE)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoToolboxVideoDecoder);

@ -0,0 +1,12 @@
diff --git a/media/gpu/v4l2/v4l2_stateful_video_decoder.cc b/media/gpu/v4l2/v4l2_stateful_video_decoder.cc
index c84dedb7d1c1f..ca8cd566d2018 100644
--- a/media/gpu/v4l2/v4l2_stateful_video_decoder.cc
+++ b/media/gpu/v4l2/v4l2_stateful_video_decoder.cc
@@ -9,6 +9,7 @@
#include <sys/eventfd.h>
#include <sys/ioctl.h>
+#include "base/containers/contains.h"
#include "base/files/file_util.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"

@ -370,8 +370,18 @@ Patch306: chromium-115-emplace_back_on_vector-c++20.patch
# revert for epel8 on aarch64 due to new feature IFUNC-Resolver not supported
# in old glibc < 2.30
# error: fatal error: 'sys/ifunc.h' file not found
Patch307: chromium-115-revert-ifunc.patch
# upstream, do not restrict new V4L2 decoders to ARM or ChromeOS
# error: use of undeclared identifier 'kV4L2FlatStatefulVideoDecoder'
# error: use of undeclared identifier 'kV4L2FlatStatelessVideoDecoder'
Patch308: chromium-115-do_not_restrict_new_V4L2_decoders.v4l2.pach
# upstream, include contains.h header for V4L2StatefulVideoDecoder
# error: no member named 'Contains' in namespace 'base'
Patch309: chromium-115-include_contains_h_header_for_V4L2StatefulVideoDecoder.patch
# Load default cursor theme if theme name is empty
Patch310: chromium-115-wayland-load_default_cursor_theme.patch
@ -986,6 +996,8 @@ udev.
%patch -P307 -p1 -R -b .ifunc
%endif
%endif
%patch -P308 -p1 -b .do_not_restrict_new_V4L2_decoders.v4l2
%patch -P309 -p1 -b .include_contains_h_header_for_V4L2StatefulVideoDecoder
%patch -P310 -p1 -b .wayland_load_default_cursor_theme
%patch -P321 -p1 -b .handle_scale_factor_changes

Loading…
Cancel
Save