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:
@ -1775,17 +1775,15 @@ EventLogAnalyzer::NetEqStatsGetterMap EventLogAnalyzer::SimulateNetEq(
|
|||||||
// incoming audio SSRC. If the stream contains more than one incoming audio
|
// incoming audio SSRC. If the stream contains more than one incoming audio
|
||||||
// SSRC, all but the first will be ignored.
|
// SSRC, all but the first will be ignored.
|
||||||
void EventLogAnalyzer::CreateAudioJitterBufferGraph(
|
void EventLogAnalyzer::CreateAudioJitterBufferGraph(
|
||||||
const NetEqStatsGetterMap& neteq_stats,
|
uint32_t ssrc,
|
||||||
|
const test::NetEqStatsGetter* stats_getter,
|
||||||
Plot* plot) const {
|
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 arrival_delay_ms;
|
||||||
test::NetEqDelayAnalyzer::Delays corrected_arrival_delay_ms;
|
test::NetEqDelayAnalyzer::Delays corrected_arrival_delay_ms;
|
||||||
test::NetEqDelayAnalyzer::Delays playout_delay_ms;
|
test::NetEqDelayAnalyzer::Delays playout_delay_ms;
|
||||||
test::NetEqDelayAnalyzer::Delays target_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,
|
&arrival_delay_ms, &corrected_arrival_delay_ms, &playout_delay_ms,
|
||||||
&target_delay_ms);
|
&target_delay_ms);
|
||||||
|
|
||||||
|
@ -76,9 +76,9 @@ class EventLogAnalyzer {
|
|||||||
std::map<uint32_t, std::unique_ptr<test::NetEqStatsGetter>>;
|
std::map<uint32_t, std::unique_ptr<test::NetEqStatsGetter>>;
|
||||||
NetEqStatsGetterMap SimulateNetEq(const std::string& replacement_file_name,
|
NetEqStatsGetterMap SimulateNetEq(const std::string& replacement_file_name,
|
||||||
int file_sample_rate_hz) const;
|
int file_sample_rate_hz) const;
|
||||||
void CreateAudioJitterBufferGraph(
|
void CreateAudioJitterBufferGraph(uint32_t ssrc,
|
||||||
const NetEqStatsGetterMap& neteq_stats_getters,
|
const test::NetEqStatsGetter* stats_getter,
|
||||||
Plot* plot) const;
|
Plot* plot) const;
|
||||||
void CreateNetEqStatsGraph(
|
void CreateNetEqStatsGraph(
|
||||||
const NetEqStatsGetterMap& neteq_stats_getters,
|
const NetEqStatsGetterMap& neteq_stats_getters,
|
||||||
rtc::FunctionView<float(const NetEqNetworkStatistics&)> stats_extractor,
|
rtc::FunctionView<float(const NetEqNetworkStatistics&)> stats_extractor,
|
||||||
|
@ -335,12 +335,12 @@ int main(int argc, char* argv[]) {
|
|||||||
"audio_processing/conversational_speech/EN_script2_F_sp2_B1", "wav");
|
"audio_processing/conversational_speech/EN_script2_F_sp2_B1", "wav");
|
||||||
}
|
}
|
||||||
auto neteq_stats = analyzer.SimulateNetEq(wav_path, 48000);
|
auto neteq_stats = analyzer.SimulateNetEq(wav_path, 48000);
|
||||||
|
for (webrtc::EventLogAnalyzer::NetEqStatsGetterMap::const_iterator it =
|
||||||
if (!neteq_stats.empty()) {
|
neteq_stats.cbegin();
|
||||||
analyzer.CreateAudioJitterBufferGraph(neteq_stats,
|
it != neteq_stats.cend(); ++it) {
|
||||||
|
analyzer.CreateAudioJitterBufferGraph(it->first, it->second.get(),
|
||||||
collection->AppendNewPlot());
|
collection->AppendNewPlot());
|
||||||
}
|
}
|
||||||
|
|
||||||
analyzer.CreateNetEqStatsGraph(
|
analyzer.CreateNetEqStatsGraph(
|
||||||
neteq_stats,
|
neteq_stats,
|
||||||
[](const webrtc::NetEqNetworkStatistics& stats) {
|
[](const webrtc::NetEqNetworkStatistics& stats) {
|
||||||
|
Reference in New Issue
Block a user