summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/moz-patch-stack/0085.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/libwebrtc/moz-patch-stack/0085.patch
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0085.patch')
-rw-r--r--third_party/libwebrtc/moz-patch-stack/0085.patch100
1 files changed, 100 insertions, 0 deletions
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 <jgrulich@redhat.com>
+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> DesktopCapturer::CreateWindowCapturer(
+ return capturer;
+ }
+
+-#if defined(WEBRTC_USE_PIPEWIRE) || defined(WEBRTC_USE_X11)
+ // static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateGenericCapturer(
+ const DesktopCaptureOptions& options) {
+@@ -100,17 +99,17 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateGenericCapturer(
+ return capturer;
+ }
+
+-// static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawGenericCapturer(
+ const DesktopCaptureOptions& options) {
++#if defined(WEBRTC_USE_PIPEWIRE)
+ if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) {
+ return std::make_unique<BaseCapturerPipeWire>(options,
+ CaptureType::kAnyScreenContent);
+ }
++#endif // defined(WEBRTC_USE_PIPEWIRE)
+
+ return nullptr;
+ }
+-#endif // defined(WEBRTC_USE_PIPEWIRE) || defined(WEBRTC_USE_X11)
+
+ // static
+ std::unique_ptr<DesktopCapturer> 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<DesktopCapturer> CreateGenericCapturer(
+ const DesktopCaptureOptions& options);
+-#endif
+
+ // Creates a DesktopCapturer instance which targets to capture windows.
+ static std::unique_ptr<DesktopCapturer> 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<DesktopCapturer> CreateRawGenericCapturer(
+ const DesktopCaptureOptions& options);
+-#endif
+
+ // Creates a platform specific DesktopCapturer instance which targets to
+ // capture windows.
+--
+2.34.1
+