From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/moz-patch-stack/0091.patch | 123 +++++++++++++++-------- 1 file changed, 79 insertions(+), 44 deletions(-) (limited to 'third_party/libwebrtc/moz-patch-stack/0091.patch') diff --git a/third_party/libwebrtc/moz-patch-stack/0091.patch b/third_party/libwebrtc/moz-patch-stack/0091.patch index b38361e516..51b0c620b0 100644 --- a/third_party/libwebrtc/moz-patch-stack/0091.patch +++ b/third_party/libwebrtc/moz-patch-stack/0091.patch @@ -1,56 +1,91 @@ -From: Michael Froman -Date: Thu, 28 Sep 2023 14:12:00 +0000 -Subject: Bug 1832465 - remove libXtst usage from libwebrtc. - r=ng,webrtc-reviewers +From: Dan Baker +Date: Mon, 2 Oct 2023 17:17:00 +0000 +Subject: Bug 1851693 - (fix-279a05475d) Revert addition of race checker which + is causing tsan failurs until better fix is landed upstream.r=pehrsons -Differential Revision: https://phabricator.services.mozilla.com/D189386 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0ec1b33b95dbb2d39355f28b2812fe25b4ad9f20 +This merely reverses a race checker that is too strict for our use, maintaining the code we had before, so we can fix upstream in the meantime tracked with Bug 1856392. + +Differential Revision: https://phabricator.services.mozilla.com/D189396 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/e626ce7279e6575e68d0e43de3dfd3ed59b00a75 --- - modules/desktop_capture/BUILD.gn | 3 +++ - modules/desktop_capture/linux/x11/shared_x_display.cc | 4 ++++ - 2 files changed, 7 insertions(+) + modules/video_capture/linux/video_capture_v4l2.cc | 7 ------- + modules/video_capture/linux/video_capture_v4l2.h | 7 +++---- + 2 files changed, 3 insertions(+), 11 deletions(-) -diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index dcc1b3c6ac..0634e0e9c4 100644 ---- a/modules/desktop_capture/BUILD.gn -+++ b/modules/desktop_capture/BUILD.gn -@@ -384,6 +384,9 @@ rtc_library("desktop_capture") { - "Xrandr", - "Xtst", - ] -+ if (build_with_mozilla) { -+ libs -= [ "Xtst" ] -+ } +diff --git a/modules/video_capture/linux/video_capture_v4l2.cc b/modules/video_capture/linux/video_capture_v4l2.cc +index 97cd9a70eb..08d23f7f58 100644 +--- a/modules/video_capture/linux/video_capture_v4l2.cc ++++ b/modules/video_capture/linux/video_capture_v4l2.cc +@@ -110,7 +110,6 @@ int32_t VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8) { + + VideoCaptureModuleV4L2::~VideoCaptureModuleV4L2() { + RTC_DCHECK_RUN_ON(&api_checker_); +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + + StopCapture(); + if (_deviceFd != -1) +@@ -120,7 +119,6 @@ VideoCaptureModuleV4L2::~VideoCaptureModuleV4L2() { + int32_t VideoCaptureModuleV4L2::StartCapture( + const VideoCaptureCapability& capability) { + RTC_DCHECK_RUN_ON(&api_checker_); +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + + if (_captureStarted) { + if (capability == _requestedCapability) { +@@ -318,7 +316,6 @@ int32_t VideoCaptureModuleV4L2::StopCapture() { + _captureThread.Finalize(); } - if (!is_win && !is_mac && !rtc_use_x11_extensions && !rtc_use_pipewire && -diff --git a/modules/desktop_capture/linux/x11/shared_x_display.cc b/modules/desktop_capture/linux/x11/shared_x_display.cc -index d690b0e2ba..3f3617b074 100644 ---- a/modules/desktop_capture/linux/x11/shared_x_display.cc -+++ b/modules/desktop_capture/linux/x11/shared_x_display.cc -@@ -11,7 +11,9 @@ - #include "modules/desktop_capture/linux/x11/shared_x_display.h" +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + MutexLock lock(&capture_lock_); + if (_captureStarted) { + _captureStarted = false; +@@ -336,7 +333,6 @@ int32_t VideoCaptureModuleV4L2::StopCapture() { + // critical section protected by the caller - #include -+#if !defined(WEBRTC_MOZILLA_BUILD) - #include -+#endif + bool VideoCaptureModuleV4L2::AllocateVideoBuffers() { +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + struct v4l2_requestbuffers rbuffer; + memset(&rbuffer, 0, sizeof(v4l2_requestbuffers)); - #include +@@ -387,7 +383,6 @@ bool VideoCaptureModuleV4L2::AllocateVideoBuffers() { + } -@@ -95,6 +97,7 @@ void SharedXDisplay::ProcessPendingXEvents() { + bool VideoCaptureModuleV4L2::DeAllocateVideoBuffers() { +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + // unmap buffers + for (int i = 0; i < _buffersAllocatedByDevice; i++) + munmap(_pool[i].start, _pool[i].length); +@@ -405,12 +400,10 @@ bool VideoCaptureModuleV4L2::DeAllocateVideoBuffers() { } - void SharedXDisplay::IgnoreXServerGrabs() { -+#if !defined(WEBRTC_MOZILLA_BUILD) - int test_event_base = 0; - int test_error_base = 0; - int major = 0; -@@ -103,6 +106,7 @@ void SharedXDisplay::IgnoreXServerGrabs() { - &minor)) { - XTestGrabControl(display(), true); - } -+#endif + bool VideoCaptureModuleV4L2::CaptureStarted() { +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + return _captureStarted; } - } // namespace webrtc + bool VideoCaptureModuleV4L2::CaptureProcess() { +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + + int retVal = 0; + struct pollfd rSet; +diff --git a/modules/video_capture/linux/video_capture_v4l2.h b/modules/video_capture/linux/video_capture_v4l2.h +index 0191e41876..61358d0325 100644 +--- a/modules/video_capture/linux/video_capture_v4l2.h ++++ b/modules/video_capture/linux/video_capture_v4l2.h +@@ -45,12 +45,11 @@ class VideoCaptureModuleV4L2 : public VideoCaptureImpl { + Mutex capture_lock_ RTC_ACQUIRED_BEFORE(api_lock_); + bool quit_ RTC_GUARDED_BY(capture_lock_); + int32_t _deviceId RTC_GUARDED_BY(api_checker_); +- int32_t _deviceFd RTC_GUARDED_BY(capture_checker_); ++ int32_t _deviceFd; + + int32_t _buffersAllocatedByDevice RTC_GUARDED_BY(capture_lock_); +- VideoCaptureCapability configured_capability_ +- RTC_GUARDED_BY(capture_checker_); +- bool _captureStarted RTC_GUARDED_BY(capture_checker_); ++ VideoCaptureCapability configured_capability_; ++ bool _captureStarted; + struct Buffer { + void* start; + size_t length; -- cgit v1.2.3