Add AEC filter divergence metric to StatsCollector.

A new metric that tells how often the AEC linear filter diverges has been recently introduced, see
https://codereview.webrtc.org/1739993003/

This metric can reflect echo failure and ducking.

In this CL, we add a field in StatsCollector to receive this metric.

BUG=
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1866983002 .

Cr-Commit-Position: refs/heads/master@{#12282}
This commit is contained in:
Minyue 2016-04-07 16:48:15 +02:00
parent 5b68ab50bb
commit 2a8a78c905
4 changed files with 9 additions and 1 deletions

View File

@ -215,7 +215,8 @@ class AudioProcessorInterface : public rtc::RefCountInterface {
echo_return_loss_enhancement(0),
echo_delay_median_ms(0),
aec_quality_min(0.0),
echo_delay_std_ms(0) {}
echo_delay_std_ms(0),
aec_divergent_filter_fraction(0.0) {}
~AudioProcessorStats() {}
bool typing_noise_detected;
@ -224,6 +225,7 @@ class AudioProcessorInterface : public rtc::RefCountInterface {
int echo_delay_median_ms;
float aec_quality_min;
int echo_delay_std_ms;
float aec_divergent_filter_fraction;
};
// Get audio processor statistics.

View File

@ -937,6 +937,9 @@ void StatsCollector::UpdateReportFromAudioTrack(AudioTrackInterface* track,
report, stats.typing_noise_detected, stats.echo_return_loss,
stats.echo_return_loss_enhancement, stats.echo_delay_median_ms,
stats.aec_quality_min, stats.echo_delay_std_ms);
report->AddFloat(StatsReport::kStatsValueNameAecDivergentFilterFraction,
stats.aec_divergent_filter_fraction);
}
}

View File

@ -363,6 +363,8 @@ bool StatsReport::Value::bool_val() const {
const char* StatsReport::Value::display_name() const {
switch (name) {
case kStatsValueNameAecDivergentFilterFraction:
return "aecDivergentFilterFraction";
case kStatsValueNameAudioOutputLevel:
return "audioOutputLevel";
case kStatsValueNameAudioInputLevel:

View File

@ -99,6 +99,7 @@ class StatsReport {
enum StatsValueName {
kStatsValueNameActiveConnection,
kStatsValueNameAecDivergentFilterFraction,
kStatsValueNameAudioInputLevel,
kStatsValueNameAudioOutputLevel,
kStatsValueNameBytesReceived,