OLD | NEW |
---|---|
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 &remote_bitrate_observer_, | 66 &remote_bitrate_observer_, |
67 &event_log_), | 67 &event_log_), |
68 bitrate_allocator_(&limit_observer_), | 68 bitrate_allocator_(&limit_observer_), |
69 worker_queue_("ConfigHelper_worker_queue") { | 69 worker_queue_("ConfigHelper_worker_queue") { |
70 using testing::Invoke; | 70 using testing::Invoke; |
71 | 71 |
72 EXPECT_CALL(voice_engine_, | 72 EXPECT_CALL(voice_engine_, |
73 RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); | 73 RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); |
74 EXPECT_CALL(voice_engine_, | 74 EXPECT_CALL(voice_engine_, |
75 DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); | 75 DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); |
76 EXPECT_CALL(voice_engine_, audio_device_module()); | |
77 EXPECT_CALL(voice_engine_, audio_processing()); | |
78 EXPECT_CALL(voice_engine_, audio_transport()); | |
79 | |
76 AudioState::Config config; | 80 AudioState::Config config; |
77 config.voice_engine = &voice_engine_; | 81 config.voice_engine = &voice_engine_; |
78 audio_state_ = AudioState::Create(config); | 82 audio_state_ = AudioState::Create(config); |
79 | 83 |
80 SetupDefaultChannelProxy(); | 84 SetupDefaultChannelProxy(); |
81 | 85 |
82 EXPECT_CALL(voice_engine_, ChannelProxyFactory(kChannelId)) | 86 EXPECT_CALL(voice_engine_, ChannelProxyFactory(kChannelId)) |
83 .WillOnce(Invoke([this](int channel_id) { | 87 .WillOnce(Invoke([this](int channel_id) { |
84 return channel_proxy_; | 88 return channel_proxy_; |
85 })); | 89 })); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 SetArgReferee<1>(kEchoReturnLossEnhancement), | 192 SetArgReferee<1>(kEchoReturnLossEnhancement), |
189 Return(0))); | 193 Return(0))); |
190 EXPECT_CALL(voice_engine_, GetEcDelayMetrics(_, _, _)) | 194 EXPECT_CALL(voice_engine_, GetEcDelayMetrics(_, _, _)) |
191 .WillRepeatedly(DoAll(SetArgReferee<0>(kEchoDelayMedian), | 195 .WillRepeatedly(DoAll(SetArgReferee<0>(kEchoDelayMedian), |
192 SetArgReferee<1>(kEchoDelayStdDev), Return(0))); | 196 SetArgReferee<1>(kEchoDelayStdDev), Return(0))); |
193 } | 197 } |
194 | 198 |
195 private: | 199 private: |
196 SimulatedClock simulated_clock_; | 200 SimulatedClock simulated_clock_; |
197 testing::StrictMock<MockVoiceEngine> voice_engine_; | 201 testing::StrictMock<MockVoiceEngine> voice_engine_; |
202 MockAudioDeviceModule mock_audio_device_; | |
the sun
2016/11/14 13:50:08
Not needed
aleloi
2016/11/14 14:24:42
Acknowledged.
| |
203 MockAudioProcessing mock_audio_processing_; | |
204 MockAudioTransport mock_audio_transport_; | |
198 rtc::scoped_refptr<AudioState> audio_state_; | 205 rtc::scoped_refptr<AudioState> audio_state_; |
199 AudioSendStream::Config stream_config_; | 206 AudioSendStream::Config stream_config_; |
200 testing::StrictMock<MockVoEChannelProxy>* channel_proxy_ = nullptr; | 207 testing::StrictMock<MockVoEChannelProxy>* channel_proxy_ = nullptr; |
201 testing::NiceMock<MockCongestionObserver> bitrate_observer_; | 208 testing::NiceMock<MockCongestionObserver> bitrate_observer_; |
202 testing::NiceMock<MockRemoteBitrateObserver> remote_bitrate_observer_; | 209 testing::NiceMock<MockRemoteBitrateObserver> remote_bitrate_observer_; |
203 CongestionController congestion_controller_; | 210 CongestionController congestion_controller_; |
204 MockRtcEventLog event_log_; | 211 MockRtcEventLog event_log_; |
205 testing::NiceMock<MockLimitObserver> limit_observer_; | 212 testing::NiceMock<MockLimitObserver> limit_observer_; |
206 BitrateAllocator bitrate_allocator_; | 213 BitrateAllocator bitrate_allocator_; |
207 // |worker_queue| is defined last to ensure all pending tasks are cancelled | 214 // |worker_queue| is defined last to ensure all pending tasks are cancelled |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
376 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) | 383 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) |
377 .WillOnce(Return(0)); | 384 .WillOnce(Return(0)); |
378 internal::AudioSendStream send_stream( | 385 internal::AudioSendStream send_stream( |
379 stream_config, helper.audio_state(), helper.worker_queue(), | 386 stream_config, helper.audio_state(), helper.worker_queue(), |
380 helper.congestion_controller(), helper.bitrate_allocator(), | 387 helper.congestion_controller(), helper.bitrate_allocator(), |
381 helper.event_log()); | 388 helper.event_log()); |
382 } | 389 } |
383 | 390 |
384 } // namespace test | 391 } // namespace test |
385 } // namespace webrtc | 392 } // namespace webrtc |
OLD | NEW |