Index: webrtc/pc/statscollector.cc |
diff --git a/webrtc/pc/statscollector.cc b/webrtc/pc/statscollector.cc |
index c9325831598549b50c3d1e63de24cddd54ab8ab3..ac9210d3f4c88af83acb8edba584fd258937d062 100644 |
--- a/webrtc/pc/statscollector.cc |
+++ b/webrtc/pc/statscollector.cc |
@@ -146,6 +146,9 @@ void ExtractStats(const cricket::VoiceReceiverInfo& info, StatsReport* report) { |
{ StatsReport::kStatsValueNameAccelerateRate, info.accelerate_rate }, |
{ StatsReport::kStatsValueNamePreemptiveExpandRate, |
info.preemptive_expand_rate }, |
+ { StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy }, |
+ { StatsReport::kStatsValueNameTotalSamplesDuration, |
+ info.total_output_duration } |
}; |
const IntForAdd ints[] = { |
@@ -195,6 +198,12 @@ void ExtractStats(const cricket::VoiceSenderInfo& info, StatsReport* report) { |
info.aec_quality_min, info.echo_delay_std_ms, |
info.residual_echo_likelihood, info.residual_echo_likelihood_recent_max); |
+ const FloatForAdd floats[] = { |
+ { StatsReport::kStatsValueNameTotalAudioEnergy, info.total_input_energy }, |
+ { StatsReport::kStatsValueNameTotalSamplesDuration, |
+ info.total_input_duration } |
+ }; |
+ |
RTC_DCHECK_GE(info.audio_level, 0); |
const IntForAdd ints[] = { |
{ StatsReport::kStatsValueNameAudioInputLevel, info.audio_level}, |
@@ -203,6 +212,10 @@ void ExtractStats(const cricket::VoiceSenderInfo& info, StatsReport* report) { |
{ StatsReport::kStatsValueNamePacketsSent, info.packets_sent }, |
}; |
+ for (const auto& f : floats) { |
+ report->AddFloat(f.name, f.value); |
+ } |
+ |
for (const auto& i : ints) { |
if (i.value >= 0) { |
report->AddInt(i.name, i.value); |