Skip to content

Commit

Permalink
Bug 1851693 - Vendor libwebrtc from 04ee24493d
Browse files Browse the repository at this point in the history
We cherry-picked this in bug 1830945.

Upstream commit: https://webrtc.googlesource.com/src/+/04ee24493d08714bd9bba83fdbdd0c6568abe1cf
    [M116] In VideoCaptureDS::{Start|Stop}Capture do not lock

    Sequence- and RaceCheckers ensure thread safety, and show that these
    locks protect nothing.

    (cherry picked from commit dcf600d7a5cdf8da51daf5b6f79df1de05002b13)

    Bug: webrtc:15181, chromium:1457919
    Change-Id: I7c26cd9aea5fa72ad9435de5ec1b9135ac22b1e8
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305649
    Reviewed-by: Ilya Nikolaevskiy <[email protected]>
    Commit-Queue: Ilya Nikolaevskiy <[email protected]>
    Reviewed-by: Per Kjellander <[email protected]>
    Cr-Original-Commit-Position: refs/heads/main@{#40345}
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310520
    Reviewed-by: Henrik Boström <[email protected]>
    Cr-Commit-Position: refs/branch-heads/5845@{#3}
    Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
  • Loading branch information
mfromanmoz committed Sep 27, 2023
1 parent da5f920 commit c1541e3
Show file tree
Hide file tree
Showing 106 changed files with 920 additions and 952 deletions.
3 changes: 3 additions & 0 deletions third_party/libwebrtc/README.moz-ff-commit
Original file line number Diff line number Diff line change
Expand Up @@ -24645,3 +24645,6 @@ ebf9a1faf8
# MOZ_LIBWEBRTC_SRC=/Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
279a05475d
# MOZ_LIBWEBRTC_SRC=/Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
04ee24493d
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -16452,3 +16452,5 @@ libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc co
libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-09-19T20:38:15.033382.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-09-19T21:48:11.371232.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-09-27T04:05:13.829503.
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0001.patch
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ index 7604de6fba..af8534316c 100644
TEST(PacketRouterRembTest, ChangeSendRtpModuleChangeRembSender) {
rtc::ScopedFakeClock clock;
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0002.patch
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ index 6596d82167..4874444eae 100644

absl::optional<std::string> transport_name =
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0003.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1694,5 +1694,5 @@ index 5e4a5d3c81..928a59104b 100644
# Selects whether the audio processing module should be excluded.
rtc_exclude_audio_processing_module = false
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0004.patch
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ index e207598d68..58485f28e9 100644
#include "modules/video_capture/video_capture_defines.h"
#include <set>
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0005.patch
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ index ad2303735e..9c2d3b0a39 100644
return false;
return streams_empty_.load(std::memory_order_relaxed);
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0006.patch
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ index 73a8bf7454..a980fb4ad3 100644
+
#endif // RTC_BASE_LOGGING_H_
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0007.patch
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ index 0b74f2ac0a..5c53f48144 100644
// between streams.
const auto ssrc_sink_it = sink_by_ssrc_.find(ssrc);
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0008.patch
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ index 2184f33801..d60a855b53 100644
// Within this list, the sender-source SSRC pair is unique and per-pair the
// ReportBlockData represents the latest Report Block that was received for
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0009.patch
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ index d60a855b53..7b5ec77f3d 100644
// Within this list, the sender-source SSRC pair is unique and per-pair the
// ReportBlockData represents the latest Report Block that was received for
--
2.37.3
2.39.3 (Apple Git-145)

8 changes: 4 additions & 4 deletions third_party/libwebrtc/moz-patch-stack/0010.patch
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ diff --git a/modules/desktop_capture/mac/screen_capturer_mac.mm b/modules/deskto
index 8f0c68d48b..8b9af35193 100644
--- a/modules/desktop_capture/mac/screen_capturer_mac.mm
+++ b/modules/desktop_capture/mac/screen_capturer_mac.mm
@@ -263,6 +263,7 @@ void ScreenCapturerMac::Start(Callback* callback) {
@@ -263,6 +263,7 @@ DesktopRect GetExcludedWindowPixelBounds(CGWindowID window, float dip_to_pixel_s
"webrtc", "ScreenCapturermac::Start", "target display id ", current_display_);

callback_ = callback;
+ update_screen_configuration_ = false;
// Start and operate CGDisplayStream handler all from capture thread.
if (!RegisterRefreshAndMoveHandlers()) {
RTC_LOG(LS_ERROR) << "Failed to register refresh and move handlers.";
@@ -283,7 +284,8 @@ void ScreenCapturerMac::CaptureFrame() {
@@ -283,7 +284,8 @@ DesktopRect GetExcludedWindowPixelBounds(CGWindowID window, float dip_to_pixel_s
}

MacDesktopConfiguration new_config = desktop_config_monitor_->desktop_configuration();
Expand All @@ -54,7 +54,7 @@ diff --git a/modules/desktop_capture/mouse_cursor_monitor_mac.mm b/modules/deskt
index 3db4332cd1..512103ab5e 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_mac.mm
+++ b/modules/desktop_capture/mouse_cursor_monitor_mac.mm
@@ -133,7 +133,7 @@ void MouseCursorMonitorMac::CaptureImage(float scale) {
@@ -133,7 +133,7 @@ void DisplaysReconfigured(CGDirectDisplayID display,
NSSize nssize = [nsimage size]; // DIP size

// No need to caputre cursor image if it's unchanged since last capture.
Expand All @@ -64,5 +64,5 @@ index 3db4332cd1..512103ab5e 100644

DesktopSize size(round(nssize.width * scale),
--
2.37.3
2.39.3 (Apple Git-145)

4 changes: 2 additions & 2 deletions third_party/libwebrtc/moz-patch-stack/0011.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ diff --git a/modules/desktop_capture/mac/screen_capturer_mac.mm b/modules/deskto
index 8b9af35193..76fec13a39 100644
--- a/modules/desktop_capture/mac/screen_capturer_mac.mm
+++ b/modules/desktop_capture/mac/screen_capturer_mac.mm
@@ -357,7 +357,8 @@ bool ScreenCapturerMac::GetSourceList(SourceList* screens) {
@@ -357,7 +357,8 @@ DesktopRect GetExcludedWindowPixelBounds(CGWindowID window, float dip_to_pixel_s
for (MacDisplayConfigurations::iterator it = desktop_config_.displays.begin();
it != desktop_config_.displays.end();
++it) {
Expand Down Expand Up @@ -52,5 +52,5 @@ index 5d881662ea..989ec7ea54 100644
// windows are allowed for the same pid.
if (itr != pid_itr_map.end() && (itr->second != sources.end())) {
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0012.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ index 51b0fcd492..17e0e33b1d 100644
}

--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0013.patch
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ index 66fd0a0ebe..7071776d0a 100644
if (conversionResult != 0) {
RTC_LOG(LS_ERROR) << "Failed to convert capture frame from type "
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0014.patch
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@ index eff720371a..94aed09c48 100644
if (number_of_cores <= 0) {
RTC_LOG(LS_ERROR) << "Failed to get number of cores";
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0015.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ index 33ea941808..2dfdd9a5df 100644
fdmax = fd;

--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0016.patch
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ index 6d369d747e..556204ac89 100644
&attr, joinable ? PTHREAD_CREATE_JOINABLE : PTHREAD_CREATE_DETACHED);
PlatformThread::Handle handle;
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0017.patch
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ index 7071776d0a..02404697ad 100644
// In Windows, the image starts bottom left, instead of top left.
// Setting a negative source height, inverts the image (within LibYuv).
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0018.patch
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ index 7cccdb51a7..2a6afb3147 100644
const int32_t diffWidth = capability.width - requested.width;
const int32_t diffHeight = capability.height - requested.height;
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0019.patch
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ index 1b52645cde..dc7b9b1a24 100644
} // namespace videocapturemodule
} // namespace webrtc
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0020.patch
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ index dc7b9b1a24..ed2a726d6f 100644
} // namespace videocapturemodule
} // namespace webrtc
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0021.patch
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ index 19b32f16b9..f77d791033 100644
}
}
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0022.patch
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ index a7eca19bbf..9d22f42f4d 100644
_hdevnotify = RegisterDeviceNotification(_hwnd, &di,
DEVICE_NOTIFY_WINDOW_HANDLE);
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0023.patch
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ index 5457402542..bceb321951 100644
#else
denoiser_state = kDenoiserOnAdaptive;
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0024.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ index 10a5bcfe7c..fedf9f5961 100644
wd2 = (s->band[band].sg[0] == s->band[band].sg[1]) ? -wd1 : wd1;
if (wd2 > 32767)
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0025.patch
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ index 7a70c2ff88..00cede01cb 100644
return true;
}
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0026.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ index c08fc4c29b..8e0e40ef70 100644

/**
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0027.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ index 877986134a..c1d2d61a71 100644
- private static native void nativeAddSample(long handle, int sample);
}
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0028.patch
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ index dec97a2c25..d5ee80c73e 100644
checkIsOnCameraThread();

--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0029.patch
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@ index 95432a509d..e3c2395f49 100644
#ifdef WEBRTC_LINUX
void HandleEvent(inotify_event* event, int fd);
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0030.patch
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ index f39852b58e..9b667739a8 100644

} // namespace webrtc
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0031.patch
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ index dc954b62e0..db34d542c8 100644

public CameraVideoCapturer createCapturer(
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0032.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ index cd0ba6e3df..c5d33ff9a4 100644
}

--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0033.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1429,5 +1429,5 @@ index 928a59104b..c25caf85e0 100644
android_library(target_name) {
forward_variables_from(invoker,
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0034.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ index fccd58b76c..e1e44ef7e4 100644
}

--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0035.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ index e761fd60c8..001c666313 100644
return formats;
}
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0036.patch
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ index f9e49db574..5f4f871bf0 100644
int64_t target_bitrate_bps = 0;
// A snapshot of Report Blocks with additional data of interest to
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0037.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ index a01e60f8bb..91f230eab7 100644
RTC_DCHECK(config_.rtp.rtcp_mode != RtcpMode::kOff)
<< "A stream should not be configured with RTCP disabled. This value is "
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0038.patch
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ index befd61849d..5b7c6884fe 100644

} // namespace rtc
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0039.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ index ed2a726d6f..e6dfaed366 100644
/*
* Display OS /capture device specific settings dialog
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0040.patch
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ index 0000000000..876e8b4c7f
+
+#endif // _XRANDR_H_WRAPPER_HACK_
--
2.37.3
2.39.3 (Apple Git-145)

4 changes: 2 additions & 2 deletions third_party/libwebrtc/moz-patch-stack/0041.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/99b99cca6b7b2c2eb
3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/video_capture/video_capture_impl.h b/modules/video_capture/video_capture_impl.h
index 3bcfa33769..b007740de3 100644
index e46e050609..dcc93fd3a0 100644
--- a/modules/video_capture/video_capture_impl.h
+++ b/modules/video_capture/video_capture_impl.h
@@ -97,6 +97,10 @@ class RTC_EXPORT VideoCaptureImpl : public VideoCaptureModule {
Expand Down Expand Up @@ -61,5 +61,5 @@ index 4f97cf74cf..363be347b5 100644
}
}
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0042.patch
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ index 7894659926..7b4b809ab1 100644
if (Build.VERSION.SDK_INT < 23) {
return;
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0043.patch
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ index 556204ac89..71a9f1b224 100644
thread_function();
});
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0044.patch
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,5 @@ index c25caf85e0..9e49573c98 100644
# Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported on
# all platforms except Android and iOS. Because FFmpeg can be built
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0045.patch
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,5 @@ index 91f230eab7..25bd997029 100644
complete_frame_callback_(complete_frame_callback),
keyframe_request_method_(config_.rtp.keyframe_method),
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0046.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ index af23f7942b..023bdbb2c4 100644
// Timing frame info: all important timestamps for a full lifetime of a
// single 'timing frame'.
--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0047.patch
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ index 4a7e7ac577..ee784ef592 100644
}

--
2.37.3
2.39.3 (Apple Git-145)

2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0048.patch
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ index 13d848dce0..46a46ef51d 100644
}

--
2.37.3
2.39.3 (Apple Git-145)

Loading

0 comments on commit c1541e3

Please sign in to comment.