#include "modules/audio_coding/audio_network_adaptor/debug_dump_writer.h"
#include <string>
#include "absl/types/optional.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/system/file_wrapper.h"
#if WEBRTC_ENABLE_PROTOBUF
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
#include "external/webrtc/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump.pb.h"
#else
#include "modules/audio_coding/audio_network_adaptor/debug_dump.pb.h"
#endif
#endif
namespace webrtc {
#if WEBRTC_ENABLE_PROTOBUF
namespace {
EncoderRuntimeConfig;
Event;
NetworkMetrics;
void DumpEventToFile(const Event& event, FileWrapper* dump_file) { … }
}
#endif
class DebugDumpWriterImpl final : public DebugDumpWriter { … };
DebugDumpWriterImpl::DebugDumpWriterImpl(FILE* file_handle) { … }
void DebugDumpWriterImpl::DumpNetworkMetrics(
const Controller::NetworkMetrics& metrics,
int64_t timestamp) { … }
void DebugDumpWriterImpl::DumpEncoderRuntimeConfig(
const AudioEncoderRuntimeConfig& config,
int64_t timestamp) { … }
#if WEBRTC_ENABLE_PROTOBUF
void DebugDumpWriterImpl::DumpControllerManagerConfig(
const audio_network_adaptor::config::ControllerManager&
controller_manager_config,
int64_t timestamp) { … }
#endif
std::unique_ptr<DebugDumpWriter> DebugDumpWriter::Create(FILE* file_handle) { … }
}