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

Unified Diff: webrtc/voice_engine/transmit_mixer.h

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/voice_engine/channel_proxy.cc ('k') | webrtc/voice_engine/transmit_mixer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/transmit_mixer.h
diff --git a/webrtc/voice_engine/transmit_mixer.h b/webrtc/voice_engine/transmit_mixer.h
index a045cf8322855abb0b7217e1b23c5e54eb80a00b..84bbbfcc4337bf99367898bd0444ecfc6c3ee966 100644
--- a/webrtc/voice_engine/transmit_mixer.h
+++ b/webrtc/voice_engine/transmit_mixer.h
@@ -76,6 +76,14 @@ public:
// 'virtual' to allow mocking.
virtual int16_t AudioLevelFullRange() const;
+ // See description of "totalAudioEnergy" in the WebRTC stats spec:
+ // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-totalaudioenergy
+ // 'virtual' to allow mocking.
+ virtual double GetTotalInputEnergy() const;
+
+ // 'virtual' to allow mocking.
+ virtual double GetTotalInputDuration() const;
+
bool IsRecordingCall();
bool IsRecordingMic();
@@ -189,6 +197,8 @@ private:
bool _fileRecording = false;
bool _fileCallRecording = false;
voe::AudioLevel _audioLevel;
+ double totalInputEnergy_ = 0.0;
+ double totalInputDuration_ = 0.0;
// protect file instances and their variables in MixedParticipants()
rtc::CriticalSection _critSect;
rtc::CriticalSection _callbackCritSect;
« no previous file with comments | « webrtc/voice_engine/channel_proxy.cc ('k') | webrtc/voice_engine/transmit_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698