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

Side by Side Diff: webrtc/test/mock_voice_engine.h

Issue 2737633002: Remove VoEHardware interface usage. (Closed)
Patch Set: test Created 3 years, 9 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 } 69 }
70 // Allows injecting a ChannelProxy factory. 70 // Allows injecting a ChannelProxy factory.
71 MOCK_METHOD1(ChannelProxyFactory, voe::ChannelProxy*(int channel_id)); 71 MOCK_METHOD1(ChannelProxyFactory, voe::ChannelProxy*(int channel_id));
72 72
73 // VoiceEngineImpl 73 // VoiceEngineImpl
74 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy( 74 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(
75 int channel_id) /* override */ { 75 int channel_id) /* override */ {
76 return std::unique_ptr<voe::ChannelProxy>(ChannelProxyFactory(channel_id)); 76 return std::unique_ptr<voe::ChannelProxy>(ChannelProxyFactory(channel_id));
77 } 77 }
78 78
79 // VoEAudioProcessing
80 MOCK_METHOD2(SetNsStatus, int(bool enable, NsModes mode));
81 MOCK_METHOD2(GetNsStatus, int(bool& enabled, NsModes& mode));
82 MOCK_METHOD2(SetAgcStatus, int(bool enable, AgcModes mode));
83 MOCK_METHOD2(GetAgcStatus, int(bool& enabled, AgcModes& mode));
84 MOCK_METHOD1(SetAgcConfig, int(AgcConfig config));
85 MOCK_METHOD1(GetAgcConfig, int(AgcConfig& config));
86 MOCK_METHOD2(SetEcStatus, int(bool enable, EcModes mode));
87 MOCK_METHOD2(GetEcStatus, int(bool& enabled, EcModes& mode));
88 MOCK_METHOD1(EnableDriftCompensation, int(bool enable));
89 MOCK_METHOD0(DriftCompensationEnabled, bool());
90 MOCK_METHOD1(SetDelayOffsetMs, void(int offset));
91 MOCK_METHOD0(DelayOffsetMs, int());
92 MOCK_METHOD2(SetAecmMode, int(AecmModes mode, bool enableCNG));
93 MOCK_METHOD2(GetAecmMode, int(AecmModes& mode, bool& enabledCNG));
94 MOCK_METHOD1(EnableHighPassFilter, int(bool enable));
95 MOCK_METHOD0(IsHighPassFilterEnabled, bool());
96 MOCK_METHOD1(VoiceActivityIndicator, int(int channel));
97 MOCK_METHOD1(SetEcMetricsStatus, int(bool enable));
98 MOCK_METHOD1(GetEcMetricsStatus, int(bool& enabled));
99 MOCK_METHOD4(GetEchoMetrics, int(int& ERL, int& ERLE, int& RERL, int& A_NLP));
100 MOCK_METHOD3(GetEcDelayMetrics,
101 int(int& delay_median,
102 int& delay_std,
103 float& fraction_poor_delays));
104 MOCK_METHOD1(StartDebugRecording, int(const char* fileNameUTF8));
105 MOCK_METHOD1(StartDebugRecording, int(FILE* file_handle));
106 MOCK_METHOD0(StopDebugRecording, int());
107 MOCK_METHOD1(SetTypingDetectionStatus, int(bool enable));
108 MOCK_METHOD1(GetTypingDetectionStatus, int(bool& enabled));
109 MOCK_METHOD1(TimeSinceLastTyping, int(int& seconds));
110 MOCK_METHOD5(SetTypingDetectionParameters,
111 int(int timeWindow,
112 int costPerTyping,
113 int reportingThreshold,
114 int penaltyDecay,
115 int typeEventDelay));
116 MOCK_METHOD1(EnableStereoChannelSwapping, void(bool enable));
117 MOCK_METHOD0(IsStereoChannelSwappingEnabled, bool());
118
119 // VoEBase 79 // VoEBase
120 MOCK_METHOD1(RegisterVoiceEngineObserver, int(VoiceEngineObserver& observer)); 80 MOCK_METHOD1(RegisterVoiceEngineObserver, int(VoiceEngineObserver& observer));
121 MOCK_METHOD0(DeRegisterVoiceEngineObserver, int()); 81 MOCK_METHOD0(DeRegisterVoiceEngineObserver, int());
122 MOCK_METHOD3( 82 MOCK_METHOD3(
123 Init, 83 Init,
124 int(AudioDeviceModule* external_adm, 84 int(AudioDeviceModule* external_adm,
125 AudioProcessing* audioproc, 85 AudioProcessing* audioproc,
126 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory)); 86 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory));
127 MOCK_METHOD0(audio_processing, AudioProcessing*()); 87 MOCK_METHOD0(audio_processing, AudioProcessing*());
128 MOCK_METHOD0(audio_device_module, AudioDeviceModule*()); 88 MOCK_METHOD0(audio_device_module, AudioDeviceModule*());
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 MOCK_METHOD3(StartRecordingPlayout, 166 MOCK_METHOD3(StartRecordingPlayout,
207 int(int channel, OutStream* stream, CodecInst* compression)); 167 int(int channel, OutStream* stream, CodecInst* compression));
208 MOCK_METHOD3(StartRecordingMicrophone, 168 MOCK_METHOD3(StartRecordingMicrophone,
209 int(const char* fileNameUTF8, 169 int(const char* fileNameUTF8,
210 CodecInst* compression, 170 CodecInst* compression,
211 int maxSizeBytes)); 171 int maxSizeBytes));
212 MOCK_METHOD2(StartRecordingMicrophone, 172 MOCK_METHOD2(StartRecordingMicrophone,
213 int(OutStream* stream, CodecInst* compression)); 173 int(OutStream* stream, CodecInst* compression));
214 MOCK_METHOD0(StopRecordingMicrophone, int()); 174 MOCK_METHOD0(StopRecordingMicrophone, int());
215 175
216 // VoEHardware
217 MOCK_METHOD1(GetNumOfRecordingDevices, int(int& devices));
218 MOCK_METHOD1(GetNumOfPlayoutDevices, int(int& devices));
219 MOCK_METHOD3(GetRecordingDeviceName,
220 int(int index, char strNameUTF8[128], char strGuidUTF8[128]));
221 MOCK_METHOD3(GetPlayoutDeviceName,
222 int(int index, char strNameUTF8[128], char strGuidUTF8[128]));
223 MOCK_METHOD2(SetRecordingDevice,
224 int(int index, StereoChannel recordingChannel));
225 MOCK_METHOD1(SetPlayoutDevice, int(int index));
226 MOCK_METHOD1(SetAudioDeviceLayer, int(AudioLayers audioLayer));
227 MOCK_METHOD1(GetAudioDeviceLayer, int(AudioLayers& audioLayer));
228 MOCK_METHOD1(SetRecordingSampleRate, int(unsigned int samples_per_sec));
229 MOCK_CONST_METHOD1(RecordingSampleRate, int(unsigned int* samples_per_sec));
230 MOCK_METHOD1(SetPlayoutSampleRate, int(unsigned int samples_per_sec));
231 MOCK_CONST_METHOD1(PlayoutSampleRate, int(unsigned int* samples_per_sec));
232 MOCK_CONST_METHOD0(BuiltInAECIsAvailable, bool());
233 MOCK_METHOD1(EnableBuiltInAEC, int(bool enable));
234 MOCK_CONST_METHOD0(BuiltInAGCIsAvailable, bool());
235 MOCK_METHOD1(EnableBuiltInAGC, int(bool enable));
236 MOCK_CONST_METHOD0(BuiltInNSIsAvailable, bool());
237 MOCK_METHOD1(EnableBuiltInNS, int(bool enable));
238
239 // VoENetEqStats 176 // VoENetEqStats
240 MOCK_METHOD2(GetNetworkStatistics, 177 MOCK_METHOD2(GetNetworkStatistics,
241 int(int channel, NetworkStatistics& stats)); 178 int(int channel, NetworkStatistics& stats));
242 MOCK_CONST_METHOD2(GetDecodingCallStatistics, 179 MOCK_CONST_METHOD2(GetDecodingCallStatistics,
243 int(int channel, AudioDecodingCallStats* stats)); 180 int(int channel, AudioDecodingCallStats* stats));
244 181
245 // VoENetwork 182 // VoENetwork
246 MOCK_METHOD2(RegisterExternalTransport, 183 MOCK_METHOD2(RegisterExternalTransport,
247 int(int channel, Transport& transport)); 184 int(int channel, Transport& transport));
248 MOCK_METHOD1(DeRegisterExternalTransport, int(int channel)); 185 MOCK_METHOD1(DeRegisterExternalTransport, int(int channel));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 241 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
305 242
306 MockAudioDeviceModule mock_audio_device_; 243 MockAudioDeviceModule mock_audio_device_;
307 MockAudioProcessing mock_audio_processing_; 244 MockAudioProcessing mock_audio_processing_;
308 MockAudioTransport mock_audio_transport_; 245 MockAudioTransport mock_audio_transport_;
309 }; 246 };
310 } // namespace test 247 } // namespace test
311 } // namespace webrtc 248 } // namespace webrtc
312 249
313 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ 250 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698