diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/moz-patch-stack/0104.patch | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0104.patch')
-rw-r--r-- | third_party/libwebrtc/moz-patch-stack/0104.patch | 146 |
1 files changed, 30 insertions, 116 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0104.patch b/third_party/libwebrtc/moz-patch-stack/0104.patch index 988f029577..a6da56ee72 100644 --- a/third_party/libwebrtc/moz-patch-stack/0104.patch +++ b/third_party/libwebrtc/moz-patch-stack/0104.patch @@ -1,119 +1,33 @@ -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 +From: Andreas Pehrson <apehrson@mozilla.com> +Date: Fri, 2 Feb 2024 18:43:00 +0000 +Subject: Bug 1878010 - Fix webrtc::VideoCaptureFactory for BSD. + r=grulja,gaston,webrtc-reviewers,mjf -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 +Differential Revision: https://phabricator.services.mozilla.com/D200427 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/f890637efe5abc0020fab83ff2224313cd0c8460 --- - modules/video_capture/linux/device_info_pipewire.cc | 3 ++- - 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, 14 insertions(+), 7 deletions(-) + modules/video_capture/video_capture_factory.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/modules/video_capture/linux/device_info_pipewire.cc b/modules/video_capture/linux/device_info_pipewire.cc -index 2cb6161514..71dcec4da9 100644 ---- a/modules/video_capture/linux/device_info_pipewire.cc -+++ b/modules/video_capture/linux/device_info_pipewire.cc -@@ -48,7 +48,8 @@ int32_t DeviceInfoPipeWire::GetDeviceName(uint32_t deviceNumber, - uint32_t deviceUniqueIdUTF8Length, - char* productUniqueIdUTF8, - uint32_t productUniqueIdUTF8Length, -- pid_t* pid) { -+ pid_t* pid, -+ bool* deviceIsPlaceholder) { - if (deviceNumber >= NumberOfDevices()) - return -1; - -diff --git a/modules/video_capture/linux/device_info_pipewire.h b/modules/video_capture/linux/device_info_pipewire.h -index 724717be5e..1a1324e92b 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 abd2886f85..eaeed26b7c 100644 ---- a/modules/video_capture/linux/device_info_v4l2.cc -+++ b/modules/video_capture/linux/device_info_v4l2.cc -@@ -250,7 +250,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 6614032299..378a53b4d2 100644 ---- a/modules/video_capture/video_capture.h -+++ b/modules/video_capture/video_capture.h -@@ -74,7 +74,8 @@ class VideoCaptureModule : public rtc::RefCountInterface { - uint32_t deviceUniqueIdUTF8Length, - char* productUniqueIdUTF8 = 0, - uint32_t productUniqueIdUTF8Length = 0, -- pid_t* pid = 0) = 0; -+ pid_t* pid = 0, -+ bool* deviceIsPlaceholder = 0) = 0; - - // 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 +diff --git a/modules/video_capture/video_capture_factory.cc b/modules/video_capture/video_capture_factory.cc +index e085ac2df8..2790fbbe1c 100644 +--- a/modules/video_capture/video_capture_factory.cc ++++ b/modules/video_capture/video_capture_factory.cc +@@ -24,7 +24,7 @@ rtc::scoped_refptr<VideoCaptureModule> VideoCaptureFactory::Create( + const char* deviceUniqueIdUTF8) { + // This is only implemented on pure Linux and WEBRTC_LINUX is defined for + // Android as well +-#if !defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) ++#if (!defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)) || defined(WEBRTC_ANDROID) + return nullptr; + #else + return videocapturemodule::VideoCaptureImpl::Create(options, +@@ -40,7 +40,7 @@ VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo( + VideoCaptureOptions* options) { + // This is only implemented on pure Linux and WEBRTC_LINUX is defined for + // Android as well +-#if !defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) ++#if (!defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)) || defined(WEBRTC_ANDROID) + return nullptr; + #else + return videocapturemodule::VideoCaptureImpl::CreateDeviceInfo(options); |