1 /* 2 * Copyright (c) 2020 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 RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZE_AUDIO_H_ 12 #define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZE_AUDIO_H_ 13 14 #include <cstdint> 15 #include <map> 16 #include <memory> 17 #include <string> 18 19 #include "api/function_view.h" 20 #include "logging/rtc_event_log/rtc_event_log_parser.h" 21 #include "modules/audio_coding/neteq/tools/neteq_stats_getter.h" 22 #include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h" 23 #include "rtc_tools/rtc_event_log_visualizer/plot_base.h" 24 25 namespace webrtc { 26 27 void CreateAudioEncoderTargetBitrateGraph(const ParsedRtcEventLog& parsed_log, 28 const AnalyzerConfig& config, 29 Plot* plot); 30 void CreateAudioEncoderFrameLengthGraph(const ParsedRtcEventLog& parsed_log, 31 const AnalyzerConfig& config, 32 Plot* plot); 33 void CreateAudioEncoderPacketLossGraph(const ParsedRtcEventLog& parsed_log, 34 const AnalyzerConfig& config, 35 Plot* plot); 36 void CreateAudioEncoderEnableFecGraph(const ParsedRtcEventLog& parsed_log, 37 const AnalyzerConfig& config, 38 Plot* plot); 39 void CreateAudioEncoderEnableDtxGraph(const ParsedRtcEventLog& parsed_log, 40 const AnalyzerConfig& config, 41 Plot* plot); 42 void CreateAudioEncoderNumChannelsGraph(const ParsedRtcEventLog& parsed_log, 43 const AnalyzerConfig& config, 44 Plot* plot); 45 46 using NetEqStatsGetterMap = 47 std::map<uint32_t, std::unique_ptr<test::NetEqStatsGetter>>; 48 NetEqStatsGetterMap SimulateNetEq(const ParsedRtcEventLog& parsed_log, 49 const AnalyzerConfig& config, 50 const std::string& replacement_file_name, 51 int file_sample_rate_hz); 52 53 void CreateAudioJitterBufferGraph(const ParsedRtcEventLog& parsed_log, 54 const AnalyzerConfig& config, 55 uint32_t ssrc, 56 const test::NetEqStatsGetter* stats_getter, 57 Plot* plot); 58 void CreateNetEqNetworkStatsGraph( 59 const ParsedRtcEventLog& parsed_log, 60 const AnalyzerConfig& config, 61 const NetEqStatsGetterMap& neteq_stats_getters, 62 rtc::FunctionView<float(const NetEqNetworkStatistics&)> stats_extractor, 63 const std::string& plot_name, 64 Plot* plot); 65 void CreateNetEqLifetimeStatsGraph( 66 const ParsedRtcEventLog& parsed_log, 67 const AnalyzerConfig& config, 68 const NetEqStatsGetterMap& neteq_stats_getters, 69 rtc::FunctionView<float(const NetEqLifetimeStatistics&)> stats_extractor, 70 const std::string& plot_name, 71 Plot* plot); 72 73 } // namespace webrtc 74 75 #endif // RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZE_AUDIO_H_ 76