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

Side by Side Diff: webrtc/test/call_test.cc

Issue 2469743002: Passed AudioMixer to AudioState::Config. (Closed)
Patch Set: Created 4 years, 1 month 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) 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/config.h" 11 #include "webrtc/config.h"
12 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" 12 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
13 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
13 #include "webrtc/test/call_test.h" 14 #include "webrtc/test/call_test.h"
14 #include "webrtc/test/testsupport/fileutils.h" 15 #include "webrtc/test/testsupport/fileutils.h"
15 #include "webrtc/voice_engine/include/voe_base.h" 16 #include "webrtc/voice_engine/include/voe_base.h"
16 17
17 namespace webrtc { 18 namespace webrtc {
18 namespace test { 19 namespace test {
19 20
20 namespace { 21 namespace {
21 const int kVideoRotationRtpExtensionId = 4; 22 const int kVideoRotationRtpExtensionId = 4;
22 } 23 }
(...skipping 16 matching lines...) Expand all
39 40
40 void CallTest::RunBaseTest(BaseTest* test) { 41 void CallTest::RunBaseTest(BaseTest* test) {
41 num_video_streams_ = test->GetNumVideoStreams(); 42 num_video_streams_ = test->GetNumVideoStreams();
42 num_audio_streams_ = test->GetNumAudioStreams(); 43 num_audio_streams_ = test->GetNumAudioStreams();
43 RTC_DCHECK(num_video_streams_ > 0 || num_audio_streams_ > 0); 44 RTC_DCHECK(num_video_streams_ > 0 || num_audio_streams_ > 0);
44 Call::Config send_config(test->GetSenderCallConfig()); 45 Call::Config send_config(test->GetSenderCallConfig());
45 if (num_audio_streams_ > 0) { 46 if (num_audio_streams_ > 0) {
46 CreateVoiceEngines(); 47 CreateVoiceEngines();
47 AudioState::Config audio_state_config; 48 AudioState::Config audio_state_config;
48 audio_state_config.voice_engine = voe_send_.voice_engine; 49 audio_state_config.voice_engine = voe_send_.voice_engine;
50 audio_state_config.audio_mixer = AudioMixerImpl::Create();
49 send_config.audio_state = AudioState::Create(audio_state_config); 51 send_config.audio_state = AudioState::Create(audio_state_config);
50 } 52 }
51 CreateSenderCall(send_config); 53 CreateSenderCall(send_config);
52 if (test->ShouldCreateReceivers()) { 54 if (test->ShouldCreateReceivers()) {
53 Call::Config recv_config(test->GetReceiverCallConfig()); 55 Call::Config recv_config(test->GetReceiverCallConfig());
54 if (num_audio_streams_ > 0) { 56 if (num_audio_streams_ > 0) {
55 AudioState::Config audio_state_config; 57 AudioState::Config audio_state_config;
56 audio_state_config.voice_engine = voe_recv_.voice_engine; 58 audio_state_config.voice_engine = voe_recv_.voice_engine;
59 audio_state_config.audio_mixer = AudioMixerImpl::Create();
57 recv_config.audio_state = AudioState::Create(audio_state_config); 60 recv_config.audio_state = AudioState::Create(audio_state_config);
58 } 61 }
59 CreateReceiverCall(recv_config); 62 CreateReceiverCall(recv_config);
60 } 63 }
61 test->OnCallsCreated(sender_call_.get(), receiver_call_.get()); 64 test->OnCallsCreated(sender_call_.get(), receiver_call_.get());
62 receive_transport_.reset(test->CreateReceiveTransport()); 65 receive_transport_.reset(test->CreateReceiveTransport());
63 send_transport_.reset(test->CreateSendTransport(sender_call_.get())); 66 send_transport_.reset(test->CreateSendTransport(sender_call_.get()));
64 67
65 if (test->ShouldCreateReceivers()) { 68 if (test->ShouldCreateReceivers()) {
66 send_transport_->SetReceiver(receiver_call_->Receiver()); 69 send_transport_->SetReceiver(receiver_call_->Receiver());
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 442
440 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { 443 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) {
441 } 444 }
442 445
443 bool EndToEndTest::ShouldCreateReceivers() const { 446 bool EndToEndTest::ShouldCreateReceivers() const {
444 return true; 447 return true;
445 } 448 }
446 449
447 } // namespace test 450 } // namespace test
448 } // namespace webrtc 451 } // namespace webrtc
OLDNEW
« webrtc/modules/audio_mixer/BUILD.gn ('K') | « webrtc/test/DEPS ('k') | webrtc/video/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698