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

Unified Diff: webrtc/voice_engine/transmit_mixer.h

Issue 2964593002: Adding stats that can be used to compute output audio levels. (Closed)
Patch Set: Dynamically compute sample_duration in transmit_mixer, add w3c links, and use a named constant in c… 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
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..7b2e11b62e34b77b30ff074a72cfdd692b8f4238 100644
--- a/webrtc/voice_engine/transmit_mixer.h
+++ b/webrtc/voice_engine/transmit_mixer.h
@@ -76,6 +76,12 @@ 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
+ double GetTotalInputEnergy() const;
+
+ double GetTotalInputDuration() const;
+
bool IsRecordingCall();
bool IsRecordingMic();
@@ -189,6 +195,8 @@ private:
bool _fileRecording = false;
bool _fileCallRecording = false;
voe::AudioLevel _audioLevel;
+ double _totalInputEnergy = 0.0;
ossu 2017/07/11 10:38:37 Same here: since both styles are used in this file
Zach Stein 2017/07/11 19:50:30 Done.
+ double _totalInputDuration = 0.0;
// protect file instances and their variables in MixedParticipants()
rtc::CriticalSection _critSect;
rtc::CriticalSection _callbackCritSect;

Powered by Google App Engine
This is Rietveld 408576698