• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_LOSS_BASED_H_
12 #define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_LOSS_BASED_H_
13 
14 #include <stdint.h>
15 
16 #include <memory>
17 
18 #include "api/rtc_event_log/rtc_event.h"
19 
20 namespace webrtc {
21 
22 class RtcEventBweUpdateLossBased final : public RtcEvent {
23  public:
24   RtcEventBweUpdateLossBased(int32_t bitrate_bps_,
25                              uint8_t fraction_loss_,
26                              int32_t total_packets_);
27   ~RtcEventBweUpdateLossBased() override;
28 
29   Type GetType() const override;
30 
31   bool IsConfigEvent() const override;
32 
33   std::unique_ptr<RtcEventBweUpdateLossBased> Copy() const;
34 
bitrate_bps()35   int32_t bitrate_bps() const { return bitrate_bps_; }
fraction_loss()36   uint8_t fraction_loss() const { return fraction_loss_; }
total_packets()37   int32_t total_packets() const { return total_packets_; }
38 
39  private:
40   RtcEventBweUpdateLossBased(const RtcEventBweUpdateLossBased& other);
41 
42   const int32_t bitrate_bps_;
43   const uint8_t fraction_loss_;
44   const int32_t total_packets_;
45 };
46 
47 }  // namespace webrtc
48 
49 #endif  // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_LOSS_BASED_H_
50