1 /*
2  *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #include "logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h"
12 
13 #include "absl/memory/memory.h"
14 
15 namespace webrtc {
16 
RtcEventBweUpdateLossBased(int32_t bitrate_bps,uint8_t fraction_loss,int32_t total_packets)17 RtcEventBweUpdateLossBased::RtcEventBweUpdateLossBased(int32_t bitrate_bps,
18                                                        uint8_t fraction_loss,
19                                                        int32_t total_packets)
20     : bitrate_bps_(bitrate_bps),
21       fraction_loss_(fraction_loss),
22       total_packets_(total_packets) {}
23 
RtcEventBweUpdateLossBased(const RtcEventBweUpdateLossBased & other)24 RtcEventBweUpdateLossBased::RtcEventBweUpdateLossBased(
25     const RtcEventBweUpdateLossBased& other)
26     : RtcEvent(other.timestamp_us_),
27       bitrate_bps_(other.bitrate_bps_),
28       fraction_loss_(other.fraction_loss_),
29       total_packets_(other.total_packets_) {}
30 
31 RtcEventBweUpdateLossBased::~RtcEventBweUpdateLossBased() = default;
32 
Copy() const33 std::unique_ptr<RtcEventBweUpdateLossBased> RtcEventBweUpdateLossBased::Copy()
34     const {
35   return absl::WrapUnique<RtcEventBweUpdateLossBased>(
36       new RtcEventBweUpdateLossBased(*this));
37 }
38 
39 }  // namespace webrtc
40