Upstream commit: https://webrtc.googlesource.com/src/+/93173ec4f5fdf71a9249e56e87707ccae750ad52 Restrict rtc_event_log.proto to offline tools + add documentation 1. Remove the legacy rtc_event_log_proto dependency from the production libwebrtc static library GN target in root BUILD.gn. 2. Restrict proto_library("rtc_event_log_proto") visibility in logging/BUILD.gn exclusively to offline parsers, neteq tools, and test suites to prevent accidental linking into production runtimes. 3. Add a deprecation banner and usage instruction to rtc_event_log.proto, update doc comments in rtc_event_log.h, and add a dedicated section in logging/g3doc/rtc_event_log.md guiding humans and AI agents on format rules. CONV=ac69de71-4eeb-4b00-b142-f66d9edf397b Bug: webrtc:144833892 Change-Id: I91f19d1f9664ecf17e38e0fa44a46b854361d6bd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/493540 Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> Cr-Commit-Position: refs/heads/main@{#48287}
89 lines
3.1 KiB
Diff
89 lines
3.1 KiB
Diff
From: Landry Breuil <landry@openbsd.org>
|
|
Date: Wed, 22 Dec 2021 00:09:00 +0000
|
|
Subject: Bug 1654448 - P2 - readd partial support for BSD to webrtc
|
|
build;r=mjf
|
|
|
|
only OpenBSD/amd64 is supported for now
|
|
|
|
Depends on D134432
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D134433
|
|
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0300b32b7de70fb8976dc82d7d3bb3adb9685857
|
|
---
|
|
BUILD.gn | 3 +++
|
|
modules/video_capture/BUILD.gn | 2 +-
|
|
modules/video_capture/linux/device_info_v4l2.h | 2 ++
|
|
rtc_base/platform_thread_types.cc | 4 +++-
|
|
webrtc.gni | 2 +-
|
|
5 files changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/BUILD.gn b/BUILD.gn
|
|
index 0cf538bb28..78d739e72e 100644
|
|
--- a/BUILD.gn
|
|
+++ b/BUILD.gn
|
|
@@ -268,6 +268,9 @@ config("common_inherited_config") {
|
|
if (is_linux || is_chromeos) {
|
|
defines += [ "WEBRTC_LINUX" ]
|
|
}
|
|
+ if (is_bsd) {
|
|
+ defines += [ "WEBRTC_BSD" ]
|
|
+ }
|
|
if (is_mac) {
|
|
defines += [ "WEBRTC_MAC" ]
|
|
}
|
|
diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn
|
|
index 66e3ad0721..5c81c975df 100644
|
|
--- a/modules/video_capture/BUILD.gn
|
|
+++ b/modules/video_capture/BUILD.gn
|
|
@@ -80,7 +80,7 @@ if (!build_with_chromium || is_linux || is_chromeos) {
|
|
"video_capture_options.h",
|
|
]
|
|
|
|
- if (is_linux || is_chromeos) {
|
|
+ if (is_linux || is_bsd || is_chromeos) {
|
|
sources += [
|
|
"linux/device_info_linux.cc",
|
|
"linux/device_info_v4l2.cc",
|
|
diff --git a/modules/video_capture/linux/device_info_v4l2.h b/modules/video_capture/linux/device_info_v4l2.h
|
|
index 7d2b5416da..74dd7e5818 100644
|
|
--- a/modules/video_capture/linux/device_info_v4l2.h
|
|
+++ b/modules/video_capture/linux/device_info_v4l2.h
|
|
@@ -17,7 +17,9 @@
|
|
#include "rtc_base/thread_annotations.h"
|
|
|
|
#include "rtc_base/platform_thread.h"
|
|
+#ifdef WEBRTC_LINUX
|
|
#include <sys/inotify.h>
|
|
+#endif
|
|
|
|
struct v4l2_capability;
|
|
|
|
diff --git a/rtc_base/platform_thread_types.cc b/rtc_base/platform_thread_types.cc
|
|
index 20bf4afc44..697bedadb9 100644
|
|
--- a/rtc_base/platform_thread_types.cc
|
|
+++ b/rtc_base/platform_thread_types.cc
|
|
@@ -56,7 +56,9 @@ PlatformThreadId CurrentThreadId() {
|
|
return static_cast<PlatformThreadId>(pthread_self());
|
|
#else
|
|
// Default implementation for nacl and solaris.
|
|
- return reinterpret_cast<PlatformThreadId>(pthread_self());
|
|
+ // WEBRTC_BSD: pthread_t is a pointer, so cannot be casted to pid_t
|
|
+ // (aka int32_t) on 64-bit archs. Required on OpenBSD.
|
|
+ return reinterpret_cast<long>(pthread_self());
|
|
#endif
|
|
#endif // defined(WEBRTC_POSIX)
|
|
}
|
|
diff --git a/webrtc.gni b/webrtc.gni
|
|
index 000a6c66d1..9afb305dee 100644
|
|
--- a/webrtc.gni
|
|
+++ b/webrtc.gni
|
|
@@ -347,7 +347,7 @@ rtc_opus_dir = "//third_party/opus"
|
|
|
|
# Desktop capturer is supported only on Windows, OSX and Linux.
|
|
rtc_desktop_capture_supported =
|
|
- (is_win && current_os != "winuwp") || is_mac ||
|
|
+ (is_win && current_os != "winuwp") || is_mac || is_bsd ||
|
|
((is_linux || is_chromeos) && (rtc_use_x11_extensions || rtc_use_pipewire))
|
|
|
|
###############################################################################
|