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

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

Issue 1991233004: Moved creation of AudioDecoderFactory to inside PeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@audio-decoder-factory-injections-3
Patch Set: Parental Advisory: Explicit Content Created 4 years, 6 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/bitrate_estimator_tests.cc ('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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 metrics::Reset(); 152 metrics::Reset();
153 VoiceEngine* voice_engine = VoiceEngine::Create(); 153 VoiceEngine* voice_engine = VoiceEngine::Create();
154 VoEBase* voe_base = VoEBase::GetInterface(voice_engine); 154 VoEBase* voe_base = VoEBase::GetInterface(voice_engine);
155 VoECodec* voe_codec = VoECodec::GetInterface(voice_engine); 155 VoECodec* voe_codec = VoECodec::GetInterface(voice_engine);
156 const std::string audio_filename = 156 const std::string audio_filename =
157 test::ResourcePath("voice_engine/audio_long16", "pcm"); 157 test::ResourcePath("voice_engine/audio_long16", "pcm");
158 ASSERT_STRNE("", audio_filename.c_str()); 158 ASSERT_STRNE("", audio_filename.c_str());
159 FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(), audio_filename, 159 FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(), audio_filename,
160 audio_rtp_speed); 160 audio_rtp_speed);
161 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr)); 161 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr, decoder_factory_));
162 Config voe_config; 162 Config voe_config;
163 voe_config.Set<VoicePacing>(new VoicePacing(true)); 163 voe_config.Set<VoicePacing>(new VoicePacing(true));
164 int send_channel_id = voe_base->CreateChannel(voe_config); 164 int send_channel_id = voe_base->CreateChannel(voe_config);
165 int recv_channel_id = voe_base->CreateChannel(); 165 int recv_channel_id = voe_base->CreateChannel();
166 166
167 AudioState::Config send_audio_state_config; 167 AudioState::Config send_audio_state_config;
168 send_audio_state_config.voice_engine = voice_engine; 168 send_audio_state_config.voice_engine = voice_engine;
169 Call::Config sender_config; 169 Call::Config sender_config;
170 sender_config.audio_state = AudioState::Create(send_audio_state_config); 170 sender_config.audio_state = AudioState::Create(send_audio_state_config);
171 Call::Config receiver_config; 171 Call::Config receiver_config;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 video_receive_configs_[0].rtp.nack.rtp_history_ms = 1000; 242 video_receive_configs_[0].rtp.nack.rtp_history_ms = 1000;
243 video_receive_configs_[0].renderer = &observer; 243 video_receive_configs_[0].renderer = &observer;
244 video_receive_configs_[0].sync_group = kSyncGroup; 244 video_receive_configs_[0].sync_group = kSyncGroup;
245 245
246 AudioReceiveStream::Config audio_recv_config; 246 AudioReceiveStream::Config audio_recv_config;
247 audio_recv_config.rtp.remote_ssrc = kAudioSendSsrc; 247 audio_recv_config.rtp.remote_ssrc = kAudioSendSsrc;
248 audio_recv_config.rtp.local_ssrc = kAudioRecvSsrc; 248 audio_recv_config.rtp.local_ssrc = kAudioRecvSsrc;
249 audio_recv_config.voe_channel_id = recv_channel_id; 249 audio_recv_config.voe_channel_id = recv_channel_id;
250 audio_recv_config.sync_group = kSyncGroup; 250 audio_recv_config.sync_group = kSyncGroup;
251 audio_recv_config.decoder_factory = decoder_factory_;
251 252
252 AudioReceiveStream* audio_receive_stream; 253 AudioReceiveStream* audio_receive_stream;
253 254
254 if (create_first == CreateOrder::kAudioFirst) { 255 if (create_first == CreateOrder::kAudioFirst) {
255 audio_receive_stream = 256 audio_receive_stream =
256 receiver_call_->CreateAudioReceiveStream(audio_recv_config); 257 receiver_call_->CreateAudioReceiveStream(audio_recv_config);
257 CreateVideoStreams(); 258 CreateVideoStreams();
258 } else { 259 } else {
259 CreateVideoStreams(); 260 CreateVideoStreams();
260 audio_receive_stream = 261 audio_receive_stream =
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 int encoder_inits_; 695 int encoder_inits_;
695 uint32_t last_set_bitrate_; 696 uint32_t last_set_bitrate_;
696 VideoSendStream* send_stream_; 697 VideoSendStream* send_stream_;
697 VideoEncoderConfig encoder_config_; 698 VideoEncoderConfig encoder_config_;
698 } test; 699 } test;
699 700
700 RunBaseTest(&test); 701 RunBaseTest(&test);
701 } 702 }
702 703
703 } // namespace webrtc 704 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/call/call_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698