Added metric for the delay in AEC3.

Bug: webrtc:8569
Change-Id: I659049a411654bd3a252ab29008fac467f903efd
Reviewed-on: https://webrtc-review.googlesource.com/25600
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20892}
This commit is contained in:
Per Åhgren
2017-11-27 12:07:09 +01:00
committed by Commit Bot
parent 6a0345b3b0
commit 83c4a02b76
4 changed files with 9 additions and 0 deletions

View File

@ -183,6 +183,8 @@ void BlockProcessorImpl::UpdateEchoLeakageStatus(bool leakage_detected) {
void BlockProcessorImpl::GetMetrics(EchoControl::Metrics* metrics) const { void BlockProcessorImpl::GetMetrics(EchoControl::Metrics* metrics) const {
echo_remover_->GetMetrics(metrics); echo_remover_->GetMetrics(metrics);
const int block_size_ms = sample_rate_hz_ == 8000 ? 8 : 4;
metrics->delay_ms = static_cast<int>(render_buffer_->Delay()) * block_size_ms;
} }
} // namespace } // namespace

View File

@ -1615,6 +1615,7 @@ AudioProcessingStats AudioProcessingImpl::GetStatistics(
stats.echo_return_loss = ec_metrics.echo_return_loss; stats.echo_return_loss = ec_metrics.echo_return_loss;
stats.echo_return_loss_enhancement = stats.echo_return_loss_enhancement =
ec_metrics.echo_return_loss_enhancement; ec_metrics.echo_return_loss_enhancement;
stats.delay_ms = ec_metrics.delay_ms;
} else if (public_submodules_->echo_cancellation->GetMetrics(&metrics) == } else if (public_submodules_->echo_cancellation->GetMetrics(&metrics) ==
Error::kNoError) { Error::kNoError) {
if (metrics.divergent_filter_fraction != -1.0f) { if (metrics.divergent_filter_fraction != -1.0f) {

View File

@ -912,6 +912,7 @@ class EchoControl {
struct Metrics { struct Metrics {
double echo_return_loss; double echo_return_loss;
double echo_return_loss_enhancement; double echo_return_loss_enhancement;
int delay_ms;
}; };
// Collect current metrics from the echo controller. // Collect current metrics from the echo controller.

View File

@ -44,6 +44,11 @@ struct AudioProcessingStats {
rtc::Optional<double> residual_echo_likelihood; rtc::Optional<double> residual_echo_likelihood;
// Maximum residual echo likelihood from the last time period. // Maximum residual echo likelihood from the last time period.
rtc::Optional<double> residual_echo_likelihood_recent_max; rtc::Optional<double> residual_echo_likelihood_recent_max;
// The instantaneous delay estimate produced in the AEC. The unit is in
// milliseconds and the value is the instantaneous value at the time of the
// call to |GetStatistics()|.
int delay_ms;
}; };
} // namespace webrtc } // namespace webrtc