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

Unified Diff: webrtc/voice_engine/channel.h

Issue 2935693005: Adding stats that can be used to compute output audio levels.
Patch Set: Created 3 years, 6 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/stats/rtcstats_objects.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.h
diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h
index 101de4060b3ce33d1c524f7d973527753e02e62c..f75bb09dd6e81711a085a327fd34258125e37395 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -260,6 +260,9 @@ class Channel
void SetChannelOutputVolumeScaling(float scaling);
int GetSpeechOutputLevel() const;
int GetSpeechOutputLevelFullRange() const;
+ // See description of "totalAudioEnergy" in the WebRTC stats spec.
+ double GetTotalOutputEnergy() const;
+ double GetTotalOutputDuration() const;
// Stats.
int GetNetworkStatistics(NetworkStatistics& stats);
@@ -470,6 +473,8 @@ class Channel
acm2::RentACodec rent_a_codec_;
std::unique_ptr<AudioSinkInterface> audio_sink_;
AudioLevel _outputAudioLevel;
+ double _totalOutputEnergy = 0;
+ double _totalOutputDuration = 0;
bool _externalTransport;
// Downsamples to the codec rate if necessary.
PushResampler<int16_t> input_resampler_;
« no previous file with comments | « webrtc/stats/rtcstats_objects.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698