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

Side by Side Diff: webrtc/call/call_perf_tests.cc

Issue 2961723004: Allow an external audio processing module to be used in WebRTC (Closed)
Patch Set: Moved creation of APMs from CreateVoiceEngines Created 3 years, 5 months 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/call/audio_state.h ('k') | webrtc/call/call_unittest.cc » ('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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void CallPerfTest::TestAudioVideoSync(FecMode fec, 138 void CallPerfTest::TestAudioVideoSync(FecMode fec,
139 CreateOrder create_first, 139 CreateOrder create_first,
140 float video_ntp_speed, 140 float video_ntp_speed,
141 float video_rtp_speed, 141 float video_rtp_speed,
142 float audio_rtp_speed) { 142 float audio_rtp_speed) {
143 const char* kSyncGroup = "av_sync"; 143 const char* kSyncGroup = "av_sync";
144 const uint32_t kAudioSendSsrc = 1234; 144 const uint32_t kAudioSendSsrc = 1234;
145 const uint32_t kAudioRecvSsrc = 5678; 145 const uint32_t kAudioRecvSsrc = 5678;
146 146
147 metrics::Reset(); 147 metrics::Reset();
148 rtc::scoped_refptr<AudioProcessing> audio_processing =
149 AudioProcessing::Create();
148 VoiceEngine* voice_engine = VoiceEngine::Create(); 150 VoiceEngine* voice_engine = VoiceEngine::Create();
149 VoEBase* voe_base = VoEBase::GetInterface(voice_engine); 151 VoEBase* voe_base = VoEBase::GetInterface(voice_engine);
150 FakeAudioDevice fake_audio_device( 152 FakeAudioDevice fake_audio_device(
151 FakeAudioDevice::CreatePulsedNoiseCapturer(256, 48000), 153 FakeAudioDevice::CreatePulsedNoiseCapturer(256, 48000),
152 FakeAudioDevice::CreateDiscardRenderer(48000), audio_rtp_speed); 154 FakeAudioDevice::CreateDiscardRenderer(48000), audio_rtp_speed);
153 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr, decoder_factory_)); 155 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, audio_processing.get(),
156 decoder_factory_));
154 VoEBase::ChannelConfig config; 157 VoEBase::ChannelConfig config;
155 config.enable_voice_pacing = true; 158 config.enable_voice_pacing = true;
156 int send_channel_id = voe_base->CreateChannel(config); 159 int send_channel_id = voe_base->CreateChannel(config);
157 int recv_channel_id = voe_base->CreateChannel(); 160 int recv_channel_id = voe_base->CreateChannel();
158 161
159 AudioState::Config send_audio_state_config; 162 AudioState::Config send_audio_state_config;
160 send_audio_state_config.voice_engine = voice_engine; 163 send_audio_state_config.voice_engine = voice_engine;
161 send_audio_state_config.audio_mixer = AudioMixerImpl::Create(); 164 send_audio_state_config.audio_mixer = AudioMixerImpl::Create();
165 send_audio_state_config.audio_processing = audio_processing;
162 Call::Config sender_config(event_log_.get()); 166 Call::Config sender_config(event_log_.get());
167
163 sender_config.audio_state = AudioState::Create(send_audio_state_config); 168 sender_config.audio_state = AudioState::Create(send_audio_state_config);
164 Call::Config receiver_config(event_log_.get()); 169 Call::Config receiver_config(event_log_.get());
165 receiver_config.audio_state = sender_config.audio_state; 170 receiver_config.audio_state = sender_config.audio_state;
166 CreateCalls(sender_config, receiver_config); 171 CreateCalls(sender_config, receiver_config);
167 172
168 173
169 VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock()); 174 VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock());
170 175
171 FakeNetworkPipe::Config audio_net_config; 176 FakeNetworkPipe::Config audio_net_config;
172 audio_net_config.queue_delay_ms = 500; 177 audio_net_config.queue_delay_ms = 500;
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 uint32_t last_set_bitrate_kbps_; 757 uint32_t last_set_bitrate_kbps_;
753 VideoSendStream* send_stream_; 758 VideoSendStream* send_stream_;
754 test::FrameGeneratorCapturer* frame_generator_; 759 test::FrameGeneratorCapturer* frame_generator_;
755 VideoEncoderConfig encoder_config_; 760 VideoEncoderConfig encoder_config_;
756 } test; 761 } test;
757 762
758 RunBaseTest(&test); 763 RunBaseTest(&test);
759 } 764 }
760 765
761 } // namespace webrtc 766 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/audio_state.h ('k') | webrtc/call/call_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698