Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3302)

Unified Diff: webrtc/pc/rtcstatscollector.cc

Issue 2964593002: Adding stats that can be used to compute output audio levels. (Closed)
Patch Set: Add test coverage in AudioSendStreamTest. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/rtcstats_integrationtest.cc ('k') | webrtc/pc/rtcstatscollector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtcstatscollector.cc
diff --git a/webrtc/pc/rtcstatscollector.cc b/webrtc/pc/rtcstatscollector.cc
index ca995327d5f21d19623e36c290c5a2941f1df431..3efebea07dd3d276840636984dd97153eda6becc 100644
--- a/webrtc/pc/rtcstatscollector.cc
+++ b/webrtc/pc/rtcstatscollector.cc
@@ -374,6 +374,9 @@ ProduceMediaStreamTrackStatsFromVoiceSenderInfo(
audio_track_stats->audio_level = DoubleAudioLevelFromIntAudioLevel(
voice_sender_info.audio_level);
}
+ audio_track_stats->total_audio_energy = voice_sender_info.total_input_energy;
+ audio_track_stats->total_samples_duration =
+ voice_sender_info.total_input_duration;
if (voice_sender_info.echo_return_loss != -100) {
audio_track_stats->echo_return_loss = static_cast<double>(
voice_sender_info.echo_return_loss);
@@ -405,6 +408,10 @@ ProduceMediaStreamTrackStatsFromVoiceReceiverInfo(
audio_track_stats->audio_level = DoubleAudioLevelFromIntAudioLevel(
voice_receiver_info.audio_level);
}
+ audio_track_stats->total_audio_energy =
+ voice_receiver_info.total_output_energy;
+ audio_track_stats->total_samples_duration =
+ voice_receiver_info.total_output_duration;
return audio_track_stats;
}
« no previous file with comments | « webrtc/pc/rtcstats_integrationtest.cc ('k') | webrtc/pc/rtcstatscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698