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}
This commit is contained in:
Minyue Li
2018-06-21 21:17:19 +02:00
committed by Commit Bot
parent 91280e4d04
commit 01d2a67a70
3 changed files with 10 additions and 12 deletions

View File

@ -1775,17 +1775,15 @@ EventLogAnalyzer::NetEqStatsGetterMap EventLogAnalyzer::SimulateNetEq(
// 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);

View File

@ -76,8 +76,8 @@ class EventLogAnalyzer {
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,
void CreateAudioJitterBufferGraph(uint32_t ssrc,
const test::NetEqStatsGetter* stats_getter,
Plot* plot) const;
void CreateNetEqStatsGraph(
const NetEqStatsGetterMap& neteq_stats_getters,

View File

@ -335,12 +335,12 @@ int main(int argc, char* argv[]) {
"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) {