summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/api/rtc_event_log
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/libwebrtc/api/rtc_event_log
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.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/api/rtc_event_log')
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/BUILD.gn48
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event.cc19
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event.h88
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event_log.cc21
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event_log.h69
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.cc48
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.h39
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory_interface.h35
-rw-r--r--third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build226
9 files changed, 593 insertions, 0 deletions
diff --git a/third_party/libwebrtc/api/rtc_event_log/BUILD.gn b/third_party/libwebrtc/api/rtc_event_log/BUILD.gn
new file mode 100644
index 0000000000..158dc06a7b
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/BUILD.gn
@@ -0,0 +1,48 @@
+# Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../../webrtc.gni")
+
+rtc_library("rtc_event_log") {
+ visibility = [ "*" ]
+ sources = [
+ "rtc_event.cc",
+ "rtc_event.h",
+ "rtc_event_log.cc",
+ "rtc_event_log.h",
+ "rtc_event_log_factory_interface.h",
+ ]
+
+ deps = [
+ "..:libjingle_logging_api",
+ "../../rtc_base:checks",
+ "../../rtc_base:timeutils",
+ "../task_queue",
+ ]
+}
+
+rtc_library("rtc_event_log_factory") {
+ visibility = [ "*" ]
+ sources = [
+ "rtc_event_log_factory.cc",
+ "rtc_event_log_factory.h",
+ ]
+
+ deps = [
+ ":rtc_event_log",
+ "../../rtc_base:checks",
+ "../../rtc_base/system:rtc_export",
+ "../../system_wrappers:field_trial",
+ "../task_queue",
+ ]
+
+ if (rtc_enable_protobuf) {
+ defines = [ "WEBRTC_ENABLE_RTC_EVENT_LOG" ]
+ deps += [ "../../logging:rtc_event_log_impl" ]
+ }
+}
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event.cc b/third_party/libwebrtc/api/rtc_event_log/rtc_event.cc
new file mode 100644
index 0000000000..631188b915
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event.cc
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "api/rtc_event_log/rtc_event.h"
+
+#include "rtc_base/time_utils.h"
+
+namespace webrtc {
+
+RtcEvent::RtcEvent() : timestamp_us_(rtc::TimeMillis() * 1000) {}
+
+} // namespace webrtc
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event.h b/third_party/libwebrtc/api/rtc_event_log/rtc_event.h
new file mode 100644
index 0000000000..aa74944fe5
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef API_RTC_EVENT_LOG_RTC_EVENT_H_
+#define API_RTC_EVENT_LOG_RTC_EVENT_H_
+
+#include <cstdint>
+
+namespace webrtc {
+
+// This class allows us to store unencoded RTC events. Subclasses of this class
+// store the actual information. This allows us to keep all unencoded events,
+// even when their type and associated information differ, in the same buffer.
+// Additionally, it prevents dependency leaking - a module that only logs
+// events of type RtcEvent_A doesn't need to know about anything associated
+// with events of type RtcEvent_B.
+class RtcEvent {
+ public:
+ // Subclasses of this class have to associate themselves with a unique value
+ // of Type. This leaks the information of existing subclasses into the
+ // superclass, but the *actual* information - rtclog::StreamConfig, etc. -
+ // is kept separate.
+ enum class Type : uint32_t {
+ AlrStateEvent,
+ RouteChangeEvent,
+ RemoteEstimateEvent,
+ AudioNetworkAdaptation,
+ AudioPlayout,
+ AudioReceiveStreamConfig,
+ AudioSendStreamConfig,
+ BweUpdateDelayBased,
+ BweUpdateLossBased,
+ DtlsTransportState,
+ DtlsWritableState,
+ IceCandidatePairConfig,
+ IceCandidatePairEvent,
+ ProbeClusterCreated,
+ ProbeResultFailure,
+ ProbeResultSuccess,
+ RtcpPacketIncoming,
+ RtcpPacketOutgoing,
+ RtpPacketIncoming,
+ RtpPacketOutgoing,
+ VideoReceiveStreamConfig,
+ VideoSendStreamConfig,
+ GenericPacketSent,
+ GenericPacketReceived,
+ GenericAckReceived,
+ FrameDecoded,
+ NetEqSetMinimumDelay,
+ BeginV3Log = 0x2501580,
+ EndV3Log = 0x2501581,
+ FakeEvent, // For unit testing.
+ };
+
+ RtcEvent();
+ virtual ~RtcEvent() = default;
+
+ virtual Type GetType() const = 0;
+
+ virtual bool IsConfigEvent() const = 0;
+
+ // Events are grouped by Type before being encoded.
+ // Optionally, `GetGroupKey` can be overloaded to group the
+ // events by a secondary key (in addition to the event type.)
+ // This can, in some cases, improve compression efficiency
+ // e.g. by grouping events by SSRC.
+ virtual uint32_t GetGroupKey() const { return 0; }
+
+ int64_t timestamp_ms() const { return timestamp_us_ / 1000; }
+ int64_t timestamp_us() const { return timestamp_us_; }
+
+ protected:
+ explicit RtcEvent(int64_t timestamp_us) : timestamp_us_(timestamp_us) {}
+
+ const int64_t timestamp_us_;
+};
+
+} // namespace webrtc
+
+#endif // API_RTC_EVENT_LOG_RTC_EVENT_H_
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event_log.cc b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log.cc
new file mode 100644
index 0000000000..56189c0ff7
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log.cc
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "api/rtc_event_log/rtc_event_log.h"
+
+namespace webrtc {
+
+bool RtcEventLogNull::StartLogging(
+ std::unique_ptr<RtcEventLogOutput> /*output*/,
+ int64_t /*output_period_ms*/) {
+ return false;
+}
+
+} // namespace webrtc
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event_log.h b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log.h
new file mode 100644
index 0000000000..7b42cdc028
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef API_RTC_EVENT_LOG_RTC_EVENT_LOG_H_
+#define API_RTC_EVENT_LOG_RTC_EVENT_LOG_H_
+
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <memory>
+
+#include "api/rtc_event_log/rtc_event.h"
+#include "api/rtc_event_log_output.h"
+#include "api/task_queue/task_queue_factory.h"
+
+namespace webrtc {
+
+class RtcEventLog {
+ public:
+ enum : size_t { kUnlimitedOutput = 0 };
+ enum : int64_t { kImmediateOutput = 0 };
+
+ // TODO(eladalon): Get rid of the legacy encoding and this enum once all
+ // clients have migrated to the new format.
+ enum class EncodingType { Legacy, NewFormat, ProtoFree };
+
+ virtual ~RtcEventLog() = default;
+
+ // Starts logging to a given output. The output might be limited in size,
+ // and may close itself once it has reached the maximum size.
+ virtual bool StartLogging(std::unique_ptr<RtcEventLogOutput> output,
+ int64_t output_period_ms) = 0;
+
+ // Stops logging to file and waits until the file has been closed, after
+ // which it would be permissible to read and/or modify it.
+ virtual void StopLogging() = 0;
+
+ // Stops logging to file and calls `callback` when the file has been closed.
+ // Note that it is not safe to call any other members, including the
+ // destructor, until the callback has been called.
+ // TODO(srte): Remove default implementation when it's safe to do so.
+ virtual void StopLogging(std::function<void()> callback) {
+ StopLogging();
+ callback();
+ }
+
+ // Log an RTC event (the type of event is determined by the subclass).
+ virtual void Log(std::unique_ptr<RtcEvent> event) = 0;
+};
+
+// No-op implementation is used if flag is not set, or in tests.
+class RtcEventLogNull final : public RtcEventLog {
+ public:
+ bool StartLogging(std::unique_ptr<RtcEventLogOutput> output,
+ int64_t output_period_ms) override;
+ void StopLogging() override {}
+ void Log(std::unique_ptr<RtcEvent> event) override {}
+};
+
+} // namespace webrtc
+
+#endif // API_RTC_EVENT_LOG_RTC_EVENT_LOG_H_
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.cc b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.cc
new file mode 100644
index 0000000000..a3cb68cf54
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.cc
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "api/rtc_event_log/rtc_event_log_factory.h"
+
+#include <memory>
+#include <utility>
+
+#include "rtc_base/checks.h"
+#include "system_wrappers/include/field_trial.h"
+
+#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG
+#include "logging/rtc_event_log/rtc_event_log_impl.h"
+#endif
+
+namespace webrtc {
+
+RtcEventLogFactory::RtcEventLogFactory(TaskQueueFactory* task_queue_factory)
+ : task_queue_factory_(task_queue_factory) {
+ RTC_DCHECK(task_queue_factory_);
+}
+
+std::unique_ptr<RtcEventLog> RtcEventLogFactory::Create(
+ RtcEventLog::EncodingType encoding_type) const {
+#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG
+ if (field_trial::IsEnabled("WebRTC-RtcEventLogKillSwitch")) {
+ return std::make_unique<RtcEventLogNull>();
+ }
+ return std::make_unique<RtcEventLogImpl>(
+ RtcEventLogImpl::CreateEncoder(encoding_type), task_queue_factory_);
+#else
+ return std::make_unique<RtcEventLogNull>();
+#endif
+}
+
+std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog(
+ RtcEventLog::EncodingType encoding_type) {
+ return Create(encoding_type);
+}
+
+} // namespace webrtc
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.h b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.h
new file mode 100644
index 0000000000..fd1db3c728
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_H_
+#define API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_H_
+
+#include <memory>
+
+#include "api/rtc_event_log/rtc_event_log.h"
+#include "api/rtc_event_log/rtc_event_log_factory_interface.h"
+#include "api/task_queue/task_queue_factory.h"
+#include "rtc_base/system/rtc_export.h"
+
+namespace webrtc {
+
+class RTC_EXPORT RtcEventLogFactory : public RtcEventLogFactoryInterface {
+ public:
+ explicit RtcEventLogFactory(TaskQueueFactory* task_queue_factory);
+ ~RtcEventLogFactory() override {}
+
+ std::unique_ptr<RtcEventLog> Create(
+ RtcEventLog::EncodingType encoding_type) const override;
+ std::unique_ptr<RtcEventLog> CreateRtcEventLog(
+ RtcEventLog::EncodingType encoding_type) override;
+
+ private:
+ TaskQueueFactory* const task_queue_factory_;
+};
+
+} // namespace webrtc
+
+#endif // API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_H_
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory_interface.h b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory_interface.h
new file mode 100644
index 0000000000..a6f4dee92f
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_factory_interface.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_INTERFACE_H_
+#define API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_INTERFACE_H_
+
+#include <memory>
+
+#include "api/rtc_event_log/rtc_event_log.h"
+
+namespace webrtc {
+
+// This interface exists to allow webrtc to be optionally built without
+// RtcEventLog support. A PeerConnectionFactory is constructed with an
+// RtcEventLogFactoryInterface, which may or may not be null.
+class RtcEventLogFactoryInterface {
+ public:
+ virtual ~RtcEventLogFactoryInterface() = default;
+
+ virtual std::unique_ptr<RtcEventLog> Create(
+ RtcEventLog::EncodingType encoding_type) const = 0;
+ [[deprecated]] virtual std::unique_ptr<RtcEventLog> CreateRtcEventLog(
+ RtcEventLog::EncodingType encoding_type) = 0;
+};
+
+} // namespace webrtc
+
+#endif // API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_INTERFACE_H_
diff --git a/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build
new file mode 100644
index 0000000000..a96be6791f
--- /dev/null
+++ b/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build
@@ -0,0 +1,226 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+
+ ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ###
+ ### DO NOT edit it by hand. ###
+
+COMPILE_FLAGS["OS_INCLUDES"] = []
+AllowCompilerWarnings()
+
+DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
+DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
+DEFINES["RTC_ENABLE_VP9"] = True
+DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
+DEFINES["WEBRTC_LIBRARY_IMPL"] = True
+DEFINES["WEBRTC_MOZILLA_BUILD"] = True
+DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
+DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0"
+
+FINAL_LIBRARY = "webrtc"
+
+
+LOCAL_INCLUDES += [
+ "!/ipc/ipdl/_ipdlheaders",
+ "!/third_party/libwebrtc/gen",
+ "/ipc/chromium/src",
+ "/third_party/libwebrtc/",
+ "/third_party/libwebrtc/third_party/abseil-cpp/",
+ "/tools/profiler/public"
+]
+
+UNIFIED_SOURCES += [
+ "/third_party/libwebrtc/api/rtc_event_log/rtc_event.cc",
+ "/third_party/libwebrtc/api/rtc_event_log/rtc_event_log.cc"
+]
+
+if not CONFIG["MOZ_DEBUG"]:
+
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
+ DEFINES["NDEBUG"] = True
+ DEFINES["NVALGRIND"] = True
+
+if CONFIG["MOZ_DEBUG"] == "1":
+
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+
+if CONFIG["OS_TARGET"] == "Android":
+
+ DEFINES["ANDROID"] = True
+ DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1"
+ DEFINES["HAVE_SYS_UIO_H"] = True
+ DEFINES["WEBRTC_ANDROID"] = True
+ DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
+ DEFINES["WEBRTC_LINUX"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_GNU_SOURCE"] = True
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+ OS_LIBS += [
+ "log"
+ ]
+
+if CONFIG["OS_TARGET"] == "Darwin":
+
+ DEFINES["WEBRTC_MAC"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+if CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+ DEFINES["WEBRTC_LINUX"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_LARGEFILE64_SOURCE"] = True
+ DEFINES["_LARGEFILE_SOURCE"] = True
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+if CONFIG["OS_TARGET"] == "OpenBSD":
+
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_LARGEFILE64_SOURCE"] = True
+ DEFINES["_LARGEFILE_SOURCE"] = True
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+if CONFIG["OS_TARGET"] == "WINNT":
+
+ DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True
+ DEFINES["NOMINMAX"] = True
+ DEFINES["NTDDI_VERSION"] = "0x0A000000"
+ DEFINES["PSAPI_VERSION"] = "2"
+ DEFINES["UNICODE"] = True
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["WEBRTC_WIN"] = True
+ DEFINES["WIN32"] = True
+ DEFINES["WIN32_LEAN_AND_MEAN"] = True
+ DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP"
+ DEFINES["WINVER"] = "0x0A00"
+ DEFINES["_ATL_NO_OPENGL"] = True
+ DEFINES["_CRT_RAND_S"] = True
+ DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True
+ DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True
+ DEFINES["_HAS_EXCEPTIONS"] = "0"
+ DEFINES["_HAS_NODISCARD"] = True
+ DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True
+ DEFINES["_SECURE_ATL"] = True
+ DEFINES["_UNICODE"] = True
+ DEFINES["_WIN32_WINNT"] = "0x0A00"
+ DEFINES["_WINDOWS"] = True
+ DEFINES["__STD_C"] = True
+
+ OS_LIBS += [
+ "winmm"
+ ]
+
+if CONFIG["CPU_ARCH"] == "aarch64":
+
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
+if CONFIG["CPU_ARCH"] == "arm":
+
+ CXXFLAGS += [
+ "-mfpu=neon"
+ ]
+
+ DEFINES["WEBRTC_ARCH_ARM"] = True
+ DEFINES["WEBRTC_ARCH_ARM_V7"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
+if CONFIG["CPU_ARCH"] == "mips32":
+
+ DEFINES["MIPS32_LE"] = True
+ DEFINES["MIPS_FPU_LE"] = True
+ DEFINES["_GNU_SOURCE"] = True
+
+if CONFIG["CPU_ARCH"] == "mips64":
+
+ DEFINES["_GNU_SOURCE"] = True
+
+if CONFIG["CPU_ARCH"] == "x86":
+
+ DEFINES["WEBRTC_ENABLE_AVX2"] = True
+
+if CONFIG["CPU_ARCH"] == "x86_64":
+
+ DEFINES["WEBRTC_ENABLE_AVX2"] = True
+
+if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android":
+
+ DEFINES["_DEBUG"] = True
+
+if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+
+ DEFINES["_DEBUG"] = True
+
+if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["_DEBUG"] = True
+
+if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD":
+
+ DEFINES["_DEBUG"] = True
+
+if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT":
+
+ DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
+
+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["USE_X11"] = "1"
+
+if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android":
+
+ OS_LIBS += [
+ "android_support",
+ "unwind"
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
+
+ OS_LIBS += [
+ "android_support"
+ ]
+
+if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["_GNU_SOURCE"] = True
+
+if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["_GNU_SOURCE"] = True
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
+
+ DEFINES["_GNU_SOURCE"] = True
+
+if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["_GNU_SOURCE"] = True
+
+Library("rtc_event_log_gn")