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)17RtcEventBweUpdateLossBased::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)24RtcEventBweUpdateLossBased::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 GetType() const33RtcEvent::Type RtcEventBweUpdateLossBased::GetType() const { 34 return RtcEvent::Type::BweUpdateLossBased; 35 } 36 IsConfigEvent() const37bool RtcEventBweUpdateLossBased::IsConfigEvent() const { 38 return false; 39 } 40 Copy() const41std::unique_ptr<RtcEventBweUpdateLossBased> RtcEventBweUpdateLossBased::Copy() 42 const { 43 return absl::WrapUnique<RtcEventBweUpdateLossBased>( 44 new RtcEventBweUpdateLossBased(*this)); 45 } 46 47 } // namespace webrtc 48