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 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "webrtc/audio/audio_send_stream.h" | 14 #include "webrtc/audio/audio_send_stream.h" |
15 #include "webrtc/audio/audio_state.h" | 15 #include "webrtc/audio/audio_state.h" |
16 #include "webrtc/audio/conversion.h" | 16 #include "webrtc/audio/conversion.h" |
17 #include "webrtc/base/task_queue.h" | 17 #include "webrtc/base/task_queue.h" |
18 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" | 18 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" |
| 19 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" |
19 #include "webrtc/modules/audio_processing/include/mock_audio_processing.h" | 20 #include "webrtc/modules/audio_processing/include/mock_audio_processing.h" |
20 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" | 21 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" |
21 #include "webrtc/modules/congestion_controller/include/mock/mock_congestion_cont
roller.h" | 22 #include "webrtc/modules/congestion_controller/include/mock/mock_congestion_cont
roller.h" |
22 #include "webrtc/modules/pacing/paced_sender.h" | 23 #include "webrtc/modules/pacing/paced_sender.h" |
23 #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitra
te_estimator.h" | 24 #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitra
te_estimator.h" |
24 #include "webrtc/test/gtest.h" | 25 #include "webrtc/test/gtest.h" |
25 #include "webrtc/test/mock_voe_channel_proxy.h" | 26 #include "webrtc/test/mock_voe_channel_proxy.h" |
26 #include "webrtc/test/mock_voice_engine.h" | 27 #include "webrtc/test/mock_voice_engine.h" |
27 | 28 |
28 namespace webrtc { | 29 namespace webrtc { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 EXPECT_CALL(voice_engine_, | 74 EXPECT_CALL(voice_engine_, |
74 RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); | 75 RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); |
75 EXPECT_CALL(voice_engine_, | 76 EXPECT_CALL(voice_engine_, |
76 DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); | 77 DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); |
77 EXPECT_CALL(voice_engine_, audio_device_module()); | 78 EXPECT_CALL(voice_engine_, audio_device_module()); |
78 EXPECT_CALL(voice_engine_, audio_processing()); | 79 EXPECT_CALL(voice_engine_, audio_processing()); |
79 EXPECT_CALL(voice_engine_, audio_transport()); | 80 EXPECT_CALL(voice_engine_, audio_transport()); |
80 | 81 |
81 AudioState::Config config; | 82 AudioState::Config config; |
82 config.voice_engine = &voice_engine_; | 83 config.voice_engine = &voice_engine_; |
| 84 config.audio_mixer = AudioMixerImpl::Create(); |
83 audio_state_ = AudioState::Create(config); | 85 audio_state_ = AudioState::Create(config); |
84 | 86 |
85 SetupDefaultChannelProxy(); | 87 SetupDefaultChannelProxy(); |
86 | 88 |
87 EXPECT_CALL(voice_engine_, ChannelProxyFactory(kChannelId)) | 89 EXPECT_CALL(voice_engine_, ChannelProxyFactory(kChannelId)) |
88 .WillOnce(Invoke([this](int channel_id) { | 90 .WillOnce(Invoke([this](int channel_id) { |
89 return channel_proxy_; | 91 return channel_proxy_; |
90 })); | 92 })); |
91 | 93 |
92 SetupMockForSetupSendCodec(); | 94 SetupMockForSetupSendCodec(); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) | 392 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) |
391 .WillOnce(Return(0)); | 393 .WillOnce(Return(0)); |
392 internal::AudioSendStream send_stream( | 394 internal::AudioSendStream send_stream( |
393 stream_config, helper.audio_state(), helper.worker_queue(), | 395 stream_config, helper.audio_state(), helper.worker_queue(), |
394 helper.congestion_controller(), helper.bitrate_allocator(), | 396 helper.congestion_controller(), helper.bitrate_allocator(), |
395 helper.event_log()); | 397 helper.event_log()); |
396 } | 398 } |
397 | 399 |
398 } // namespace test | 400 } // namespace test |
399 } // namespace webrtc | 401 } // namespace webrtc |
OLD | NEW |