summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/moz-patch-stack/0063.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/libwebrtc/moz-patch-stack/0063.patch
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0063.patch')
-rw-r--r--third_party/libwebrtc/moz-patch-stack/0063.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0063.patch b/third_party/libwebrtc/moz-patch-stack/0063.patch
new file mode 100644
index 0000000000..37a746e145
--- /dev/null
+++ b/third_party/libwebrtc/moz-patch-stack/0063.patch
@@ -0,0 +1,76 @@
+From: Michael Froman <mjfroman@mac.com>
+Date: Thu, 19 May 2022 15:32:32 -0500
+Subject: Bug 1772380 - Build 1766646 - (fix-c89fdd716c) fixes for the
+ refactored PlatformThread API;r?mjf
+
+---
+ .../video_capture/linux/device_info_v4l2.cc | 20 ++++++-------------
+ .../video_capture/linux/device_info_v4l2.h | 3 +--
+ 2 files changed, 7 insertions(+), 16 deletions(-)
+
+diff --git a/modules/video_capture/linux/device_info_v4l2.cc b/modules/video_capture/linux/device_info_v4l2.cc
+index e8abcdda78..7651dd6651 100644
+--- a/modules/video_capture/linux/device_info_v4l2.cc
++++ b/modules/video_capture/linux/device_info_v4l2.cc
+@@ -133,11 +133,6 @@ int DeviceInfoV4l2::ProcessInotifyEvents()
+ return 0;
+ }
+
+-void DeviceInfoV4l2::InotifyEventThread(void* obj)
+-{
+- static_cast<DeviceInfoLinux*> (obj)->InotifyProcess();
+-}
+-
+ void DeviceInfoV4l2::InotifyProcess()
+ {
+ _fd_v4l = inotify_init();
+@@ -163,16 +158,14 @@ void DeviceInfoV4l2::InotifyProcess()
+
+ DeviceInfoV4l2::DeviceInfoV4l2() : DeviceInfoImpl()
+ #ifdef WEBRTC_LINUX
+- , _inotifyEventThread(new rtc::PlatformThread(
+- InotifyEventThread, this, "InotifyEventThread"))
+ , _isShutdown(false)
+ #endif
+ {
+ #ifdef WEBRTC_LINUX
+- if (_inotifyEventThread)
+- {
+- _inotifyEventThread->Start();
+- }
++ _inotifyEventThread = rtc::PlatformThread::SpawnJoinable(
++ [this] {
++ InotifyProcess();
++ }, "InotifyEventThread");
+ #endif
+ }
+
+@@ -184,9 +177,8 @@ DeviceInfoV4l2::~DeviceInfoV4l2() {
+ #ifdef WEBRTC_LINUX
+ _isShutdown = true;
+
+- if (_inotifyEventThread) {
+- _inotifyEventThread->Stop();
+- _inotifyEventThread = nullptr;
++ if (!_inotifyEventThread.empty()) {
++ _inotifyEventThread.Finalize();
+ }
+ #endif
+ }
+diff --git a/modules/video_capture/linux/device_info_v4l2.h b/modules/video_capture/linux/device_info_v4l2.h
+index 119cb07ab8..0bec3eb765 100644
+--- a/modules/video_capture/linux/device_info_v4l2.h
++++ b/modules/video_capture/linux/device_info_v4l2.h
+@@ -60,8 +60,7 @@ class DeviceInfoV4l2 : public DeviceInfoImpl {
+ int EventCheck(int fd);
+ int HandleEvents(int fd);
+ int ProcessInotifyEvents();
+- std::unique_ptr<rtc::PlatformThread> _inotifyEventThread;
+- static void InotifyEventThread(void*);
++ rtc::PlatformThread _inotifyEventThread;
+ void InotifyProcess();
+ int _fd_v4l, _fd_dev, _wd_v4l, _wd_dev; /* accessed on InotifyEventThread thread */
+ std::atomic<bool> _isShutdown;
+--
+2.34.1
+