OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |