Plot NetEq stats in RTC event log visualizer.

Bug: webrtc:9147
Change-Id: I61ec7bc5299201e25e1efc503b73b84d5be3ebbf
Reviewed-on: https://webrtc-review.googlesource.com/71740
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23151}
This commit is contained in:
Minyue Li
2018-05-07 15:20:24 +02:00
committed by Commit Bot
parent 0424c19fda
commit 27e2b7d177
6 changed files with 127 additions and 68 deletions

View File

@ -112,9 +112,7 @@ DEFINE_bool(plot_audio_encoder_dtx, false, "Plot the audio encoder DTX.");
DEFINE_bool(plot_audio_encoder_num_channels,
false,
"Plot the audio encoder number of channels.");
DEFINE_bool(plot_audio_jitter_buffer,
false,
"Plot the audio jitter buffer delay profile.");
DEFINE_bool(plot_neteq_stats, false, "Plot the NetEq statistics.");
DEFINE_bool(plot_ice_candidate_pair_config,
false,
"Plot the ICE candidate pair config events.");
@ -325,7 +323,7 @@ int main(int argc, char* argv[]) {
if (FLAG_plot_audio_encoder_num_channels) {
analyzer.CreateAudioEncoderNumChannelsGraph(collection->AppendNewPlot());
}
if (FLAG_plot_audio_jitter_buffer) {
if (FLAG_plot_neteq_stats) {
std::string wav_path;
if (FLAG_wav_filename[0] != '\0') {
wav_path = FLAG_wav_filename;
@ -336,6 +334,30 @@ int main(int argc, char* argv[]) {
auto neteq_stats = analyzer.SimulateNetEq(wav_path, 48000);
analyzer.CreateAudioJitterBufferGraph(neteq_stats,
collection->AppendNewPlot());
analyzer.CreateNetEqStatsGraph(
neteq_stats,
[](const webrtc::NetEqNetworkStatistics& stats) {
return stats.expand_rate / 16384.f;
},
"Expand rate", collection->AppendNewPlot());
analyzer.CreateNetEqStatsGraph(
neteq_stats,
[](const webrtc::NetEqNetworkStatistics& stats) {
return stats.speech_expand_rate / 16384.f;
},
"Speech expand rate", collection->AppendNewPlot());
analyzer.CreateNetEqStatsGraph(
neteq_stats,
[](const webrtc::NetEqNetworkStatistics& stats) {
return stats.accelerate_rate / 16384.f;
},
"Accelerate rate", collection->AppendNewPlot());
analyzer.CreateNetEqStatsGraph(
neteq_stats,
[](const webrtc::NetEqNetworkStatistics& stats) {
return stats.packet_loss_rate / 16384.f;
},
"Packet loss rate", collection->AppendNewPlot());
}
if (FLAG_plot_ice_candidate_pair_config) {
@ -382,7 +404,7 @@ void SetAllPlotFlags(bool setting) {
FLAG_plot_audio_encoder_fec = setting;
FLAG_plot_audio_encoder_dtx = setting;
FLAG_plot_audio_encoder_num_channels = setting;
FLAG_plot_audio_jitter_buffer = setting;
FLAG_plot_neteq_stats = setting;
FLAG_plot_ice_candidate_pair_config = setting;
FLAG_plot_ice_connectivity_check = setting;
}