diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/moz-patch-stack/0100.patch | 145 |
1 files changed, 115 insertions, 30 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0100.patch b/third_party/libwebrtc/moz-patch-stack/0100.patch index 7cf1017a12..07be6fc934 100644 --- a/third_party/libwebrtc/moz-patch-stack/0100.patch +++ b/third_party/libwebrtc/moz-patch-stack/0100.patch @@ -1,36 +1,121 @@ -From: Michael Froman <mfroman@mozilla.com> -Date: Mon, 4 Dec 2023 12:57:00 -0600 -Subject: Bug 1867099 - (fix-66b7275561) disable wgc capture yellow-line - removal. r?ng! +From: Jan Grulich <jgrulich@redhat.com> +Date: Thu, 30 Nov 2023 11:49:00 +0000 +Subject: Bug 1844020 - Add option to DeviceInfo::GetDeviceName() identifying a + placeholder device r=pehrsons,webrtc-reviewers -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 +Adds a new parameter "deviceIsPlaceholder" that will be set to true in +case the returned device is not a real device but a placeholder that is +just used to inform about camera device existence. + +Differential Revision: https://phabricator.services.mozilla.com/D189929 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/ed31b2acb5fbca3e2d0691a64bc52e65952070c0 --- - modules/desktop_capture/win/wgc_capture_session.cc | 6 ++++++ - 1 file changed, 6 insertions(+) + modules/video_capture/linux/device_info_pipewire.cc | 4 +++- + modules/video_capture/linux/device_info_pipewire.h | 3 ++- + modules/video_capture/linux/device_info_v4l2.cc | 3 ++- + modules/video_capture/linux/device_info_v4l2.h | 3 ++- + modules/video_capture/video_capture.h | 3 ++- + modules/video_capture/windows/device_info_ds.cc | 3 ++- + modules/video_capture/windows/device_info_ds.h | 3 ++- + 7 files changed, 15 insertions(+), 7 deletions(-) -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/modules/video_capture/linux/device_info_pipewire.cc b/modules/video_capture/linux/device_info_pipewire.cc +index fc0554f384..f9f08a9c27 100644 +--- a/modules/video_capture/linux/device_info_pipewire.cc ++++ b/modules/video_capture/linux/device_info_pipewire.cc +@@ -50,8 +50,10 @@ int32_t DeviceInfoPipeWire::GetDeviceName(uint32_t deviceNumber, + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8, + uint32_t productUniqueIdUTF8Length, +- pid_t* pid) { ++ pid_t* pid, ++ bool* deviceIsPlaceholder) { + RTC_CHECK(pipewire_session_); ++ + if (deviceNumber >= NumberOfDevices()) + return -1; -+// 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 +diff --git a/modules/video_capture/linux/device_info_pipewire.h b/modules/video_capture/linux/device_info_pipewire.h +index 8a33d75892..00715c94bc 100644 +--- a/modules/video_capture/linux/device_info_pipewire.h ++++ b/modules/video_capture/linux/device_info_pipewire.h +@@ -30,7 +30,8 @@ class DeviceInfoPipeWire : public DeviceInfoImpl { + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8 = nullptr, + uint32_t productUniqueIdUTF8Length = 0, +- pid_t* pid = 0) override; ++ pid_t* pid = 0, ++ bool* deviceIsPlaceholder = 0) override; + /* + * Fills the membervariable _captureCapabilities with capabilites for the + * given device name. +diff --git a/modules/video_capture/linux/device_info_v4l2.cc b/modules/video_capture/linux/device_info_v4l2.cc +index 04caaea592..401c38f9c5 100644 +--- a/modules/video_capture/linux/device_info_v4l2.cc ++++ b/modules/video_capture/linux/device_info_v4l2.cc +@@ -232,7 +232,8 @@ int32_t DeviceInfoV4l2::GetDeviceName(uint32_t deviceNumber, + uint32_t deviceUniqueIdUTF8Length, + char* /*productUniqueIdUTF8*/, + uint32_t /*productUniqueIdUTF8Length*/, +- pid_t* /*pid*/) { ++ pid_t* /*pid*/, ++ bool* /*deviceIsPlaceholder*/) { + // Travel through /dev/video [0-63] + uint32_t count = 0; + char device[20]; +diff --git a/modules/video_capture/linux/device_info_v4l2.h b/modules/video_capture/linux/device_info_v4l2.h +index 0bec3eb765..55415845ad 100644 +--- a/modules/video_capture/linux/device_info_v4l2.h ++++ b/modules/video_capture/linux/device_info_v4l2.h +@@ -36,7 +36,8 @@ class DeviceInfoV4l2 : public DeviceInfoImpl { + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8 = 0, + uint32_t productUniqueIdUTF8Length = 0, +- pid_t* pid=0) override; ++ pid_t* pid = 0, ++ bool* deviceIsPlaceholder = 0) override; + /* + * Fills the membervariable _captureCapabilities with capabilites for the + * given device name. +diff --git a/modules/video_capture/video_capture.h b/modules/video_capture/video_capture.h +index 43a6a7f832..f59c34f8b2 100644 +--- a/modules/video_capture/video_capture.h ++++ b/modules/video_capture/video_capture.h +@@ -74,7 +74,8 @@ class VideoCaptureModule : public RefCountInterface { + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8 = 0, + uint32_t productUniqueIdUTF8Length = 0, +- pid_t* pid = 0) = 0; ++ pid_t* pid = 0, ++ bool* deviceIsPlaceholder = 0) = 0; - allow_zero_hertz_ = options.allow_wgc_zero_hertz(); + // Returns the number of capabilities this device. + virtual int32_t NumberOfCapabilities(const char* deviceUniqueIdUTF8) = 0; +diff --git a/modules/video_capture/windows/device_info_ds.cc b/modules/video_capture/windows/device_info_ds.cc +index f6927281f3..8ca741239c 100644 +--- a/modules/video_capture/windows/device_info_ds.cc ++++ b/modules/video_capture/windows/device_info_ds.cc +@@ -173,7 +173,8 @@ int32_t DeviceInfoDS::GetDeviceName(uint32_t deviceNumber, + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8, + uint32_t productUniqueIdUTF8Length, +- pid_t* pid) { ++ pid_t* pid, ++ bool* deviceIsPlaceholder) { + MutexLock lock(&_apiLock); + const int32_t result = GetDeviceInfo( + deviceNumber, deviceNameUTF8, deviceNameLength, deviceUniqueIdUTF8, +diff --git a/modules/video_capture/windows/device_info_ds.h b/modules/video_capture/windows/device_info_ds.h +index e6dfaed366..a9a1449b99 100644 +--- a/modules/video_capture/windows/device_info_ds.h ++++ b/modules/video_capture/windows/device_info_ds.h +@@ -51,7 +51,8 @@ class DeviceInfoDS : public DeviceInfoImpl { + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8, + uint32_t productUniqueIdUTF8Length, +- pid_t* pid) override; ++ pid_t* pid, ++ bool* deviceIsPlaceholder) override; + /* + * Display OS /capture device specific settings dialog |