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

Side by Side Diff: webrtc/voice_engine/transmit_mixer.h

Issue 2964593002: Adding stats that can be used to compute output audio levels. (Closed)
Patch Set: Also report send stats. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 uint32_t CaptureLevel() const; 69 uint32_t CaptureLevel() const;
70 70
71 int32_t StopSend(); 71 int32_t StopSend();
72 72
73 // TODO(solenberg): Remove, once AudioMonitor is gone. 73 // TODO(solenberg): Remove, once AudioMonitor is gone.
74 int8_t AudioLevel() const; 74 int8_t AudioLevel() const;
75 75
76 // 'virtual' to allow mocking. 76 // 'virtual' to allow mocking.
77 virtual int16_t AudioLevelFullRange() const; 77 virtual int16_t AudioLevelFullRange() const;
78 78
79 // See description of "totalAudioEnergy" in the WebRTC stats spec.
80 double GetTotalInputEnergy() const;
81
82 double GetTotalInputDuration() const;
83
79 bool IsRecordingCall(); 84 bool IsRecordingCall();
80 85
81 bool IsRecordingMic(); 86 bool IsRecordingMic();
82 87
83 int StartPlayingFileAsMicrophone(const char* fileName, 88 int StartPlayingFileAsMicrophone(const char* fileName,
84 bool loop, 89 bool loop,
85 FileFormats format, 90 FileFormats format,
86 int startPosition, 91 int startPosition,
87 float volumeScaling, 92 float volumeScaling,
88 int stopPosition, 93 int stopPosition,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 std::unique_ptr<FilePlayer> file_player_; 187 std::unique_ptr<FilePlayer> file_player_;
183 std::unique_ptr<FileRecorder> file_recorder_; 188 std::unique_ptr<FileRecorder> file_recorder_;
184 std::unique_ptr<FileRecorder> file_call_recorder_; 189 std::unique_ptr<FileRecorder> file_call_recorder_;
185 int _filePlayerId = 0; 190 int _filePlayerId = 0;
186 int _fileRecorderId = 0; 191 int _fileRecorderId = 0;
187 int _fileCallRecorderId = 0; 192 int _fileCallRecorderId = 0;
188 bool _filePlaying = false; 193 bool _filePlaying = false;
189 bool _fileRecording = false; 194 bool _fileRecording = false;
190 bool _fileCallRecording = false; 195 bool _fileCallRecording = false;
191 voe::AudioLevel _audioLevel; 196 voe::AudioLevel _audioLevel;
197 double _totalInputEnergy = 0;
hlundin-webrtc 2017/07/03 13:23:03 0.0 here and below.
Zach Stein 2017/07/06 17:41:37 Done.
198 double _totalInputDuration = 0;
192 // protect file instances and their variables in MixedParticipants() 199 // protect file instances and their variables in MixedParticipants()
193 rtc::CriticalSection _critSect; 200 rtc::CriticalSection _critSect;
194 rtc::CriticalSection _callbackCritSect; 201 rtc::CriticalSection _callbackCritSect;
195 202
196 #if WEBRTC_VOICE_ENGINE_TYPING_DETECTION 203 #if WEBRTC_VOICE_ENGINE_TYPING_DETECTION
197 MonitorModule<TransmitMixer> _monitorModule; 204 MonitorModule<TransmitMixer> _monitorModule;
198 webrtc::TypingDetection _typingDetection; 205 webrtc::TypingDetection _typingDetection;
199 bool _typingNoiseWarningPending = false; 206 bool _typingNoiseWarningPending = false;
200 bool _typingNoiseDetected = false; 207 bool _typingNoiseDetected = false;
201 #endif 208 #endif
202 209
203 int _instanceId = 0; 210 int _instanceId = 0;
204 bool _mixFileWithMicrophone = false; 211 bool _mixFileWithMicrophone = false;
205 uint32_t _captureLevel = 0; 212 uint32_t _captureLevel = 0;
206 bool stereo_codec_ = false; 213 bool stereo_codec_ = false;
207 bool swap_stereo_channels_ = false; 214 bool swap_stereo_channels_ = false;
208 }; 215 };
209 } // namespace voe 216 } // namespace voe
210 } // namespace webrtc 217 } // namespace webrtc
211 218
212 #endif // WEBRTC_VOICE_ENGINE_TRANSMIT_MIXER_H 219 #endif // WEBRTC_VOICE_ENGINE_TRANSMIT_MIXER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698