From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/moz-patch-stack/0085.patch | 100 +++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 third_party/libwebrtc/moz-patch-stack/0085.patch (limited to 'third_party/libwebrtc/moz-patch-stack/0085.patch') diff --git a/third_party/libwebrtc/moz-patch-stack/0085.patch b/third_party/libwebrtc/moz-patch-stack/0085.patch new file mode 100644 index 0000000000..bac4cf6c9c --- /dev/null +++ b/third_party/libwebrtc/moz-patch-stack/0085.patch @@ -0,0 +1,100 @@ +From: Jan Grulich +Date: Mon, 27 Feb 2023 13:57:00 +0000 +Subject: Bug 1819044 - fix build non-pipewire builds + r=webrtc-reviewers,pehrsons + +We should check only for PipeWire presence when building code specific +to PipeWire. + +Differential Revision: https://phabricator.services.mozilla.com/D171071 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/7a879ad084a6e9768479c73cc5c3f4e9d95a2ab9 + +Also includes: + + Bug 1819044 - fix build non-pipewire builds (attempt #2) r=webrtc-reviewers,pehrsons + + Make the new API available to everyone and just return an empty capturer + in case when building without PipeWire. It will not make any difference + because using X11 based capturers on Wayland is useless anyway so if we + fail for missing PipeWire on Wayland, it will have the same outcome. + + Differential Revision: https://phabricator.services.mozilla.com/D171192 + Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/ad247b0aac896d884eba5e40f0ec8a9f50d8b85b +--- + modules/desktop_capture/desktop_capturer.cc | 7 +++---- + modules/desktop_capture/desktop_capturer.h | 4 ---- + 2 files changed, 3 insertions(+), 8 deletions(-) + +diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc +index 7df6becb4e..1af19a1fd2 100644 +--- a/modules/desktop_capture/desktop_capturer.cc ++++ b/modules/desktop_capture/desktop_capturer.cc +@@ -26,7 +26,7 @@ + #include "rtc_base/win/windows_version.h" + #endif // defined(RTC_ENABLE_WIN_WGC) + +-#if defined(WEBRTC_USE_PIPEWIRE) || defined(WEBRTC_USE_X11) ++#if defined(WEBRTC_USE_PIPEWIRE) + #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" + #endif + +@@ -88,7 +88,6 @@ std::unique_ptr DesktopCapturer::CreateWindowCapturer( + return capturer; + } + +-#if defined(WEBRTC_USE_PIPEWIRE) || defined(WEBRTC_USE_X11) + // static + std::unique_ptr DesktopCapturer::CreateGenericCapturer( + const DesktopCaptureOptions& options) { +@@ -100,17 +99,17 @@ std::unique_ptr DesktopCapturer::CreateGenericCapturer( + return capturer; + } + +-// static + std::unique_ptr DesktopCapturer::CreateRawGenericCapturer( + const DesktopCaptureOptions& options) { ++#if defined(WEBRTC_USE_PIPEWIRE) + if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { + return std::make_unique(options, + CaptureType::kAnyScreenContent); + } ++#endif // defined(WEBRTC_USE_PIPEWIRE) + + return nullptr; + } +-#endif // defined(WEBRTC_USE_PIPEWIRE) || defined(WEBRTC_USE_X11) + + // static + std::unique_ptr DesktopCapturer::CreateScreenCapturer( +diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h +index 951c4a9b10..12ef57ba26 100644 +--- a/modules/desktop_capture/desktop_capturer.h ++++ b/modules/desktop_capture/desktop_capturer.h +@@ -170,11 +170,9 @@ class RTC_EXPORT DesktopCapturer { + // The return value if `pos` is out of the scope of the source is undefined. + virtual bool IsOccluded(const DesktopVector& pos); + +-#if defined(WEBRTC_USE_PIPEWIRE) || defined(WEBRTC_USE_X11) + // Creates a DesktopCapturer instance which targets to capture windows and screens. + static std::unique_ptr CreateGenericCapturer( + const DesktopCaptureOptions& options); +-#endif + + // Creates a DesktopCapturer instance which targets to capture windows. + static std::unique_ptr CreateWindowCapturer( +@@ -204,12 +202,10 @@ class RTC_EXPORT DesktopCapturer { + // CroppingWindowCapturer needs to create raw capturers without wrappers, so + // the following two functions are protected. + +-#if defined(WEBRTC_USE_PIPEWIRE) || defined(WEBRTC_USE_X11) + // Creates a platform specific DesktopCapturer instance which targets to + // capture windows and screens. + static std::unique_ptr CreateRawGenericCapturer( + const DesktopCaptureOptions& options); +-#endif + + // Creates a platform specific DesktopCapturer instance which targets to + // capture windows. +-- +2.34.1 + -- cgit v1.2.3