xref: /aosp_15_r20/external/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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_DEBUG_DUMP_WRITER_H_
12 #define MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP_WRITER_H_
13 
14 #include <memory>
15 
16 #include "modules/audio_coding/audio_network_adaptor/controller.h"
17 #include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
18 #include "rtc_base/ignore_wundef.h"
19 #include "rtc_base/system/file_wrapper.h"
20 #if WEBRTC_ENABLE_PROTOBUF
21 RTC_PUSH_IGNORING_WUNDEF()
22 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
23 #include "external/webrtc/webrtc/modules/audio_coding/audio_network_adaptor/config.pb.h"
24 #else
25 #include "modules/audio_coding/audio_network_adaptor/config.pb.h"
26 #endif
RTC_POP_IGNORING_WUNDEF()27 RTC_POP_IGNORING_WUNDEF()
28 #endif
29 
30 namespace webrtc {
31 
32 class DebugDumpWriter {
33  public:
34   static std::unique_ptr<DebugDumpWriter> Create(FILE* file_handle);
35 
36   virtual ~DebugDumpWriter() = default;
37 
38   virtual void DumpEncoderRuntimeConfig(const AudioEncoderRuntimeConfig& config,
39                                         int64_t timestamp) = 0;
40 
41   virtual void DumpNetworkMetrics(const Controller::NetworkMetrics& metrics,
42                                   int64_t timestamp) = 0;
43 
44 #if WEBRTC_ENABLE_PROTOBUF
45   virtual void DumpControllerManagerConfig(
46       const audio_network_adaptor::config::ControllerManager&
47           controller_manager_config,
48       int64_t timestamp) = 0;
49 #endif
50 };
51 
52 }  // namespace webrtc
53 
54 #endif  // MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP_WRITER_H_
55