Adding jitter buffer plots for all SSRCs in event log visualizer.
Bug: webrtc:9147
Change-Id: I64291666d329c026f35ecf1c4245b192794441fe
Reviewed-on: https://webrtc-review.googlesource.com/84745
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23726}
diff --git a/rtc_tools/event_log_visualizer/analyzer.cc b/rtc_tools/event_log_visualizer/analyzer.cc
index 9e86eb0..99235e0 100644
--- a/rtc_tools/event_log_visualizer/analyzer.cc
+++ b/rtc_tools/event_log_visualizer/analyzer.cc
@@ -1775,17 +1775,15 @@
// incoming audio SSRC. If the stream contains more than one incoming audio
// SSRC, all but the first will be ignored.
void EventLogAnalyzer::CreateAudioJitterBufferGraph(
- const NetEqStatsGetterMap& neteq_stats,
+ uint32_t ssrc,
+ const test::NetEqStatsGetter* stats_getter,
Plot* plot) const {
- RTC_CHECK(!neteq_stats.empty());
- const uint32_t ssrc = neteq_stats.begin()->first;
-
test::NetEqDelayAnalyzer::Delays arrival_delay_ms;
test::NetEqDelayAnalyzer::Delays corrected_arrival_delay_ms;
test::NetEqDelayAnalyzer::Delays playout_delay_ms;
test::NetEqDelayAnalyzer::Delays target_delay_ms;
- neteq_stats.at(ssrc)->delay_analyzer()->CreateGraphs(
+ stats_getter->delay_analyzer()->CreateGraphs(
&arrival_delay_ms, &corrected_arrival_delay_ms, &playout_delay_ms,
&target_delay_ms);
diff --git a/rtc_tools/event_log_visualizer/analyzer.h b/rtc_tools/event_log_visualizer/analyzer.h
index d4a7fc3..6c7e056 100644
--- a/rtc_tools/event_log_visualizer/analyzer.h
+++ b/rtc_tools/event_log_visualizer/analyzer.h
@@ -76,9 +76,9 @@
std::map<uint32_t, std::unique_ptr<test::NetEqStatsGetter>>;
NetEqStatsGetterMap SimulateNetEq(const std::string& replacement_file_name,
int file_sample_rate_hz) const;
- void CreateAudioJitterBufferGraph(
- const NetEqStatsGetterMap& neteq_stats_getters,
- Plot* plot) const;
+ void CreateAudioJitterBufferGraph(uint32_t ssrc,
+ const test::NetEqStatsGetter* stats_getter,
+ Plot* plot) const;
void CreateNetEqStatsGraph(
const NetEqStatsGetterMap& neteq_stats_getters,
rtc::FunctionView<float(const NetEqNetworkStatistics&)> stats_extractor,
diff --git a/rtc_tools/event_log_visualizer/main.cc b/rtc_tools/event_log_visualizer/main.cc
index 7d9d45e..8a303b2 100644
--- a/rtc_tools/event_log_visualizer/main.cc
+++ b/rtc_tools/event_log_visualizer/main.cc
@@ -335,12 +335,12 @@
"audio_processing/conversational_speech/EN_script2_F_sp2_B1", "wav");
}
auto neteq_stats = analyzer.SimulateNetEq(wav_path, 48000);
-
- if (!neteq_stats.empty()) {
- analyzer.CreateAudioJitterBufferGraph(neteq_stats,
+ for (webrtc::EventLogAnalyzer::NetEqStatsGetterMap::const_iterator it =
+ neteq_stats.cbegin();
+ it != neteq_stats.cend(); ++it) {
+ analyzer.CreateAudioJitterBufferGraph(it->first, it->second.get(),
collection->AppendNewPlot());
}
-
analyzer.CreateNetEqStatsGraph(
neteq_stats,
[](const webrtc::NetEqNetworkStatistics& stats) {