summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/libwebrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc')
-rw-r--r--third_party/libwebrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc43
1 files changed, 43 insertions, 0 deletions
diff --git a/third_party/libwebrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc b/third_party/libwebrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc
new file mode 100644
index 0000000000..0e98b2ff11
--- /dev/null
+++ b/third_party/libwebrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+#include "logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h"
+
+#include "absl/memory/memory.h"
+#include "api/network_state_predictor.h"
+
+namespace webrtc {
+
+constexpr RtcEventDefinition<RtcEventBweUpdateDelayBased,
+ LoggedBweDelayBasedUpdate,
+ int32_t,
+ BandwidthUsage>
+ RtcEventBweUpdateDelayBased::definition_;
+
+RtcEventBweUpdateDelayBased::RtcEventBweUpdateDelayBased(
+ int32_t bitrate_bps,
+ BandwidthUsage detector_state)
+ : bitrate_bps_(bitrate_bps), detector_state_(detector_state) {}
+
+RtcEventBweUpdateDelayBased::RtcEventBweUpdateDelayBased(
+ const RtcEventBweUpdateDelayBased& other)
+ : RtcEvent(other.timestamp_us_),
+ bitrate_bps_(other.bitrate_bps_),
+ detector_state_(other.detector_state_) {}
+
+RtcEventBweUpdateDelayBased::~RtcEventBweUpdateDelayBased() = default;
+
+std::unique_ptr<RtcEventBweUpdateDelayBased> RtcEventBweUpdateDelayBased::Copy()
+ const {
+ return absl::WrapUnique<RtcEventBweUpdateDelayBased>(
+ new RtcEventBweUpdateDelayBased(*this));
+}
+
+} // namespace webrtc