| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 #include "webrtc/base/checks.h" | 10 #include "webrtc/base/checks.h" |
| 11 #include "webrtc/common.h" | |
| 12 #include "webrtc/config.h" | 11 #include "webrtc/config.h" |
| 13 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" | 12 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" |
| 14 #include "webrtc/test/call_test.h" | 13 #include "webrtc/test/call_test.h" |
| 15 #include "webrtc/test/encoder_settings.h" | 14 #include "webrtc/test/encoder_settings.h" |
| 16 #include "webrtc/test/testsupport/fileutils.h" | 15 #include "webrtc/test/testsupport/fileutils.h" |
| 17 #include "webrtc/voice_engine/include/voe_base.h" | 16 #include "webrtc/voice_engine/include/voe_base.h" |
| 18 #include "webrtc/voice_engine/include/voe_codec.h" | 17 #include "webrtc/voice_engine/include/voe_codec.h" |
| 19 | 18 |
| 20 namespace webrtc { | 19 namespace webrtc { |
| 21 namespace test { | 20 namespace test { |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 allocated_decoders_.clear(); | 304 allocated_decoders_.clear(); |
| 306 } | 305 } |
| 307 | 306 |
| 308 void CallTest::CreateVoiceEngines() { | 307 void CallTest::CreateVoiceEngines() { |
| 309 CreateFakeAudioDevices(); | 308 CreateFakeAudioDevices(); |
| 310 voe_send_.voice_engine = VoiceEngine::Create(); | 309 voe_send_.voice_engine = VoiceEngine::Create(); |
| 311 voe_send_.base = VoEBase::GetInterface(voe_send_.voice_engine); | 310 voe_send_.base = VoEBase::GetInterface(voe_send_.voice_engine); |
| 312 voe_send_.codec = VoECodec::GetInterface(voe_send_.voice_engine); | 311 voe_send_.codec = VoECodec::GetInterface(voe_send_.voice_engine); |
| 313 EXPECT_EQ(0, voe_send_.base->Init(fake_send_audio_device_.get(), nullptr, | 312 EXPECT_EQ(0, voe_send_.base->Init(fake_send_audio_device_.get(), nullptr, |
| 314 decoder_factory_)); | 313 decoder_factory_)); |
| 315 Config voe_config; | 314 VoEBase::ChannelConfig config; |
| 316 voe_config.Set<VoicePacing>(new VoicePacing(true)); | 315 config.enable_voice_pacing = true; |
| 317 voe_send_.channel_id = voe_send_.base->CreateChannel(voe_config); | 316 voe_send_.channel_id = voe_send_.base->CreateChannel(config); |
| 318 EXPECT_GE(voe_send_.channel_id, 0); | 317 EXPECT_GE(voe_send_.channel_id, 0); |
| 319 | 318 |
| 320 voe_recv_.voice_engine = VoiceEngine::Create(); | 319 voe_recv_.voice_engine = VoiceEngine::Create(); |
| 321 voe_recv_.base = VoEBase::GetInterface(voe_recv_.voice_engine); | 320 voe_recv_.base = VoEBase::GetInterface(voe_recv_.voice_engine); |
| 322 voe_recv_.codec = VoECodec::GetInterface(voe_recv_.voice_engine); | 321 voe_recv_.codec = VoECodec::GetInterface(voe_recv_.voice_engine); |
| 323 EXPECT_EQ(0, voe_recv_.base->Init(fake_recv_audio_device_.get(), nullptr, | 322 EXPECT_EQ(0, voe_recv_.base->Init(fake_recv_audio_device_.get(), nullptr, |
| 324 decoder_factory_)); | 323 decoder_factory_)); |
| 325 voe_recv_.channel_id = voe_recv_.base->CreateChannel(); | 324 voe_recv_.channel_id = voe_recv_.base->CreateChannel(); |
| 326 EXPECT_GE(voe_recv_.channel_id, 0); | 325 EXPECT_GE(voe_recv_.channel_id, 0); |
| 327 } | 326 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 429 |
| 431 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { | 430 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { |
| 432 } | 431 } |
| 433 | 432 |
| 434 bool EndToEndTest::ShouldCreateReceivers() const { | 433 bool EndToEndTest::ShouldCreateReceivers() const { |
| 435 return true; | 434 return true; |
| 436 } | 435 } |
| 437 | 436 |
| 438 } // namespace test | 437 } // namespace test |
| 439 } // namespace webrtc | 438 } // namespace webrtc |
| OLD | NEW |