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

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

Issue 2469743002: Passed AudioMixer to AudioState::Config. (Closed)
Patch Set: Rebase. GYP removed! 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
« no previous file with comments | « webrtc/test/DEPS ('k') | webrtc/video/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10
11 #include "webrtc/test/call_test.h" 11 #include "webrtc/test/call_test.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 14
15 #include "webrtc/base/checks.h" 15 #include "webrtc/base/checks.h"
16 #include "webrtc/config.h" 16 #include "webrtc/config.h"
17 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" 17 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
18 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
19 #include "webrtc/test/call_test.h"
18 #include "webrtc/test/testsupport/fileutils.h" 20 #include "webrtc/test/testsupport/fileutils.h"
19 #include "webrtc/voice_engine/include/voe_base.h" 21 #include "webrtc/voice_engine/include/voe_base.h"
20 22
21 namespace webrtc { 23 namespace webrtc {
22 namespace test { 24 namespace test {
23 25
24 namespace { 26 namespace {
25 const int kVideoRotationRtpExtensionId = 4; 27 const int kVideoRotationRtpExtensionId = 4;
26 } 28 }
27 29
(...skipping 17 matching lines...) Expand all
45 void CallTest::RunBaseTest(BaseTest* test) { 47 void CallTest::RunBaseTest(BaseTest* test) {
46 num_video_streams_ = test->GetNumVideoStreams(); 48 num_video_streams_ = test->GetNumVideoStreams();
47 num_audio_streams_ = test->GetNumAudioStreams(); 49 num_audio_streams_ = test->GetNumAudioStreams();
48 num_flexfec_streams_ = test->GetNumFlexfecStreams(); 50 num_flexfec_streams_ = test->GetNumFlexfecStreams();
49 RTC_DCHECK(num_video_streams_ > 0 || num_audio_streams_ > 0); 51 RTC_DCHECK(num_video_streams_ > 0 || num_audio_streams_ > 0);
50 Call::Config send_config(test->GetSenderCallConfig()); 52 Call::Config send_config(test->GetSenderCallConfig());
51 if (num_audio_streams_ > 0) { 53 if (num_audio_streams_ > 0) {
52 CreateVoiceEngines(); 54 CreateVoiceEngines();
53 AudioState::Config audio_state_config; 55 AudioState::Config audio_state_config;
54 audio_state_config.voice_engine = voe_send_.voice_engine; 56 audio_state_config.voice_engine = voe_send_.voice_engine;
57 audio_state_config.audio_mixer = AudioMixerImpl::Create();
55 send_config.audio_state = AudioState::Create(audio_state_config); 58 send_config.audio_state = AudioState::Create(audio_state_config);
56 } 59 }
57 CreateSenderCall(send_config); 60 CreateSenderCall(send_config);
58 if (test->ShouldCreateReceivers()) { 61 if (test->ShouldCreateReceivers()) {
59 Call::Config recv_config(test->GetReceiverCallConfig()); 62 Call::Config recv_config(test->GetReceiverCallConfig());
60 if (num_audio_streams_ > 0) { 63 if (num_audio_streams_ > 0) {
61 AudioState::Config audio_state_config; 64 AudioState::Config audio_state_config;
62 audio_state_config.voice_engine = voe_recv_.voice_engine; 65 audio_state_config.voice_engine = voe_recv_.voice_engine;
66 audio_state_config.audio_mixer = AudioMixerImpl::Create();
63 recv_config.audio_state = AudioState::Create(audio_state_config); 67 recv_config.audio_state = AudioState::Create(audio_state_config);
64 } 68 }
65 CreateReceiverCall(recv_config); 69 CreateReceiverCall(recv_config);
66 } 70 }
67 test->OnCallsCreated(sender_call_.get(), receiver_call_.get()); 71 test->OnCallsCreated(sender_call_.get(), receiver_call_.get());
68 receive_transport_.reset(test->CreateReceiveTransport()); 72 receive_transport_.reset(test->CreateReceiveTransport());
69 send_transport_.reset(test->CreateSendTransport(sender_call_.get())); 73 send_transport_.reset(test->CreateSendTransport(sender_call_.get()));
70 74
71 if (test->ShouldCreateReceivers()) { 75 if (test->ShouldCreateReceivers()) {
72 send_transport_->SetReceiver(receiver_call_->Receiver()); 76 send_transport_->SetReceiver(receiver_call_->Receiver());
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 503
500 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { 504 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) {
501 } 505 }
502 506
503 bool EndToEndTest::ShouldCreateReceivers() const { 507 bool EndToEndTest::ShouldCreateReceivers() const {
504 return true; 508 return true;
505 } 509 }
506 510
507 } // namespace test 511 } // namespace test
508 } // namespace webrtc 512 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/DEPS ('k') | webrtc/video/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698