• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2016 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 MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_EVENT_LOG_WRITER_H_
12 #define MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_EVENT_LOG_WRITER_H_
13 
14 #include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
15 #include "rtc_base/constructor_magic.h"
16 
17 namespace webrtc {
18 class RtcEventLog;
19 
20 class EventLogWriter final {
21  public:
22   EventLogWriter(RtcEventLog* event_log,
23                  int min_bitrate_change_bps,
24                  float min_bitrate_change_fraction,
25                  float min_packet_loss_change_fraction);
26   ~EventLogWriter();
27   void MaybeLogEncoderConfig(const AudioEncoderRuntimeConfig& config);
28 
29  private:
30   void LogEncoderConfig(const AudioEncoderRuntimeConfig& config);
31 
32   RtcEventLog* const event_log_;
33   const int min_bitrate_change_bps_;
34   const float min_bitrate_change_fraction_;
35   const float min_packet_loss_change_fraction_;
36   AudioEncoderRuntimeConfig last_logged_config_;
37   RTC_DISALLOW_COPY_AND_ASSIGN(EventLogWriter);
38 };
39 
40 }  // namespace webrtc
41 
42 #endif  // MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_EVENT_LOG_WRITER_H_
43