From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/moz-patch-stack/0101.patch | 88 ++++++++---------------- 1 file changed, 30 insertions(+), 58 deletions(-) (limited to 'third_party/libwebrtc/moz-patch-stack/0101.patch') diff --git a/third_party/libwebrtc/moz-patch-stack/0101.patch b/third_party/libwebrtc/moz-patch-stack/0101.patch index 6ad5dd698c..7cf1017a12 100644 --- a/third_party/libwebrtc/moz-patch-stack/0101.patch +++ b/third_party/libwebrtc/moz-patch-stack/0101.patch @@ -1,64 +1,36 @@ -From: Nico Grunbaum -Date: Wed, 15 Nov 2023 22:33:00 +0000 -Subject: Bug 1863041 - P0 - add device filter control to - RTCCameraVideoCapturer;r=pehrsons,webrtc-reviewers +From: Michael Froman +Date: Mon, 4 Dec 2023 12:57:00 -0600 +Subject: Bug 1867099 - (fix-66b7275561) disable wgc capture yellow-line + removal. r?ng! -I have filed this bug upstream: https://bugs.chromium.org/p/webrtc/issues/detail?id=15639 - -Differential Revision: https://phabricator.services.mozilla.com/D193172 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/91a763d768b74acc9cf4828f91a86df4a7b092ce +This code won't build until we support building with +Win 10 SDK v10.0.20348.0 or newer. +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0aac94794aad2ddb637f5076bc08706a11866737 --- - .../capturer/RTCCameraVideoCapturer.h | 5 ++++- - .../capturer/RTCCameraVideoCapturer.m | 17 +++++++++++++++-- - 2 files changed, 19 insertions(+), 3 deletions(-) + modules/desktop_capture/win/wgc_capture_session.cc | 6 ++++++ + 1 file changed, 6 insertions(+) -diff --git a/sdk/objc/components/capturer/RTCCameraVideoCapturer.h b/sdk/objc/components/capturer/RTCCameraVideoCapturer.h -index 370bfa70f0..b1f3f64f74 100644 ---- a/sdk/objc/components/capturer/RTCCameraVideoCapturer.h -+++ b/sdk/objc/components/capturer/RTCCameraVideoCapturer.h -@@ -26,7 +26,10 @@ NS_EXTENSION_UNAVAILABLE_IOS("Camera not available in app extensions.") - @property(readonly, nonatomic) AVCaptureSession *captureSession; - - // Returns list of available capture devices that support video capture. --+ (NSArray *)captureDevices; -++ (NSArray *)captureDevicesWithDeviceTypes: -+ (NSArray *)deviceTypes; -+// Returns list of default capture devices types -++ (NSArray *)defaultCaptureDeviceTypes; - // Returns list of formats that are supported by this class for this device. - + (NSArray *)supportedFormatsForDevice:(AVCaptureDevice *)device; +diff --git a/modules/desktop_capture/win/wgc_capture_session.cc b/modules/desktop_capture/win/wgc_capture_session.cc +index 8c74c2bf24..86afc52411 100644 +--- a/modules/desktop_capture/win/wgc_capture_session.cc ++++ b/modules/desktop_capture/win/wgc_capture_session.cc +@@ -188,6 +188,11 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { + } + } -diff --git a/sdk/objc/components/capturer/RTCCameraVideoCapturer.m b/sdk/objc/components/capturer/RTCCameraVideoCapturer.m -index e7c47b4e99..1361207faf 100644 ---- a/sdk/objc/components/capturer/RTCCameraVideoCapturer.m -+++ b/sdk/objc/components/capturer/RTCCameraVideoCapturer.m -@@ -117,14 +117,27 @@ const int64_t kNanosecondsPerSecond = 1000000000; - [[NSNotificationCenter defaultCenter] removeObserver:self]; - } ++// Until Mozilla builds with Win 10 SDK v10.0.20348.0 or newer, this ++// code will not build. Once we support the newer SDK, Bug 1868198 ++// exists to decide if we ever want to use this code since it is ++// removing an indicator that capture is happening. ++#if !defined(WEBRTC_MOZILLA_BUILD) + // By default, the WGC capture API adds a yellow border around the captured + // window or display to indicate that a capture is in progress. The section + // below is an attempt to remove this yellow border to make the capture +@@ -199,6 +204,7 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { + &session3))) { + session3->put_IsBorderRequired(false); + } ++#endif --+ (NSArray *)captureDevices { -++ (NSArray *)captureDevicesWithDeviceTypes: -+ (NSArray *)deviceTypes { - AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession -- discoverySessionWithDeviceTypes:@[ AVCaptureDeviceTypeBuiltInWideAngleCamera ] -+ discoverySessionWithDeviceTypes:deviceTypes - mediaType:AVMediaTypeVideo - position:AVCaptureDevicePositionUnspecified]; - return session.devices; - } + allow_zero_hertz_ = options.allow_wgc_zero_hertz(); -++ (NSArray *)defaultCaptureDeviceTypes { -+ NSArray *types = @[ AVCaptureDeviceTypeBuiltInWideAngleCamera ]; -+#if !defined(WEBRTC_IOS) -+ if (@available(macOS 14.0, *)) { -+ types = [types arrayByAddingObject:AVCaptureDeviceTypeExternal]; -+ } else { -+ types = [types arrayByAddingObject:AVCaptureDeviceTypeExternalUnknown]; -+ } -+#endif -+ return types; -+} -+ - + (NSArray *)supportedFormatsForDevice:(AVCaptureDevice *)device { - // Support opening the device in any format. We make sure it's converted to a format we - // can handle, if needed, in the method `-setupVideoDataOutput`. -- cgit v1.2.3