diff --git a/webrtc/api/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h index 2a3f3473b0..57c0776a32 100644 --- a/webrtc/api/mediastreaminterface.h +++ b/webrtc/api/mediastreaminterface.h @@ -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. diff --git a/webrtc/api/statscollector.cc b/webrtc/api/statscollector.cc index 0901fc61b1..38fb5fb7db 100644 --- a/webrtc/api/statscollector.cc +++ b/webrtc/api/statscollector.cc @@ -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); } } diff --git a/webrtc/api/statstypes.cc b/webrtc/api/statstypes.cc index feeead4374..61af82467a 100644 --- a/webrtc/api/statstypes.cc +++ b/webrtc/api/statstypes.cc @@ -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: diff --git a/webrtc/api/statstypes.h b/webrtc/api/statstypes.h index 9a44724e8f..7efd0fe38a 100644 --- a/webrtc/api/statstypes.h +++ b/webrtc/api/statstypes.h @@ -99,6 +99,7 @@ class StatsReport { enum StatsValueName { kStatsValueNameActiveConnection, + kStatsValueNameAecDivergentFilterFraction, kStatsValueNameAudioInputLevel, kStatsValueNameAudioOutputLevel, kStatsValueNameBytesReceived,