APM reports ERL and ERLE metrics for AEC3.

The audio processing module reports the metrics 'echo return loss'
and 'echo return loss enhancement' for AEC3.

Bug: webrtc:8533
Change-Id: I166c504adf013d6cb5d6d3c9717d0622c3454bb7
Reviewed-on: https://webrtc-review.googlesource.com/24880
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20835}
This commit is contained in:
Gustaf Ullberg
2017-11-22 14:17:39 +01:00
committed by Commit Bot
parent 63e232a2cf
commit 332150d7df
14 changed files with 62 additions and 3 deletions

View File

@ -1608,8 +1608,16 @@ AudioProcessing::AudioProcessingStats AudioProcessingImpl::GetStatistics(
AudioProcessingStats stats;
if (has_remote_tracks) {
EchoCancellation::Metrics metrics;
if (public_submodules_->echo_cancellation->GetMetrics(&metrics) ==
Error::kNoError) {
if (private_submodules_->echo_controller) {
rtc::CritScope cs_capture(&crit_capture_);
EchoControl::Metrics ec_metrics =
private_submodules_->echo_controller->GetMetrics();
stats.echo_return_loss =
rtc::Optional<double>(ec_metrics.echo_return_loss);
stats.echo_return_loss_enhancement =
rtc::Optional<double>(ec_metrics.echo_return_loss_enhancement);
} else if (public_submodules_->echo_cancellation->GetMetrics(&metrics) ==
Error::kNoError) {
if (metrics.divergent_filter_fraction != -1.0f) {
stats.divergent_filter_fraction =
rtc::Optional<double>(metrics.divergent_filter_fraction);