From 0379d8cfeac189a7fd815e23908b422b861592c7 Mon Sep 17 00:00:00 2001 From: Artem Titov Date: Mon, 13 May 2019 14:26:31 +0200 Subject: [PATCH] Change a way, how receive stream is determined in DefaultAudioQualityAnalyzer. Bug: webrtc:10138 Change-Id: I8955c30f0a5d98abeca029323396e469a2fb243b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136683 Reviewed-by: Mirko Bonadei Commit-Queue: Artem Titov Cr-Commit-Position: refs/heads/master@{#27927} --- .../audio/default_audio_quality_analyzer.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc index 0792069e64..07f3d63b8b 100644 --- a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc +++ b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc @@ -45,15 +45,10 @@ void DefaultAudioQualityAnalyzer::OnStatsReports( if (strcmp(media_type->static_string_val(), kStatsAudioMediaType) != 0) { continue; } - const webrtc::StatsReport::Value* bytes_received = stats_report->FindValue( - StatsReport::StatsValueName::kStatsValueNameBytesReceived); - if (bytes_received == nullptr || bytes_received->int64_val() == 0) { - // Discarding stats in the following situations: - // - When bytes_received is not present, because NetEq stats are only - // available in recv-side SSRC. - // - When bytes_received is present but its value is 0. This means - // that media is not yet flowing so there is no need to keep this - // stats report into account (since all its fields would be 0). + if (stats_report->FindValue( + webrtc::StatsReport::kStatsValueNameBytesSent)) { + // If kStatsValueNameBytesSent is present, it means it's a send stream, + // but we need audio metrics for receive stream, so skip it. continue; }