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/video/call_perf_tests.cc

Issue 1273363005: Add send transports to individual webrtc::Call streams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase+comment Created 5 years, 3 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/video/call.cc ('k') | webrtc/video/end_to_end_tests.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 #include <algorithm> 10 #include <algorithm>
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 FakeNetworkPipe::Config net_config; 233 FakeNetworkPipe::Config net_config;
234 net_config.queue_delay_ms = 500; 234 net_config.queue_delay_ms = 500;
235 net_config.loss_percent = 5; 235 net_config.loss_percent = 5;
236 SyncRtcpObserver audio_observer(net_config); 236 SyncRtcpObserver audio_observer(net_config);
237 VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock(), 237 VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock(),
238 channel, 238 channel,
239 voe_sync, 239 voe_sync,
240 &audio_observer); 240 &audio_observer);
241 241
242 Call::Config receiver_config(observer.ReceiveTransport()); 242 Call::Config receiver_config;
243 receiver_config.voice_engine = voice_engine; 243 receiver_config.voice_engine = voice_engine;
244 CreateCalls(Call::Config(observer.SendTransport()), receiver_config); 244 CreateCalls(Call::Config(), receiver_config);
245 245
246 CodecInst isac = {103, "ISAC", 16000, 480, 1, 32000}; 246 CodecInst isac = {103, "ISAC", 16000, 480, 1, 32000};
247 EXPECT_EQ(0, voe_codec->SetSendCodec(channel, isac)); 247 EXPECT_EQ(0, voe_codec->SetSendCodec(channel, isac));
248 248
249 AudioPacketReceiver voe_packet_receiver(channel, voe_network); 249 AudioPacketReceiver voe_packet_receiver(channel, voe_network);
250 audio_observer.SetReceivers(&voe_packet_receiver, &voe_packet_receiver); 250 audio_observer.SetReceivers(&voe_packet_receiver, &voe_packet_receiver);
251 251
252 internal::TransportAdapter transport_adapter(audio_observer.SendTransport()); 252 internal::TransportAdapter transport_adapter(audio_observer.SendTransport());
253 transport_adapter.Enable(); 253 transport_adapter.Enable();
254 EXPECT_EQ(0, 254 EXPECT_EQ(0,
255 voe_network->RegisterExternalTransport(channel, transport_adapter)); 255 voe_network->RegisterExternalTransport(channel, transport_adapter));
256 256
257 observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver()); 257 observer.SetReceivers(receiver_call_->Receiver(), sender_call_->Receiver());
258 258
259 test::FakeDecoder fake_decoder; 259 test::FakeDecoder fake_decoder;
260 260
261 CreateSendConfig(1); 261 CreateSendConfig(1, observer.SendTransport());
262 CreateMatchingReceiveConfigs(); 262 CreateMatchingReceiveConfigs(observer.ReceiveTransport());
263 263
264 send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 264 send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
265 if (fec) { 265 if (fec) {
266 send_config_.rtp.fec.red_payload_type = kRedPayloadType; 266 send_config_.rtp.fec.red_payload_type = kRedPayloadType;
267 send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType; 267 send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
268 receive_configs_[0].rtp.fec.red_payload_type = kRedPayloadType; 268 receive_configs_[0].rtp.fec.red_payload_type = kRedPayloadType;
269 receive_configs_[0].rtp.fec.ulpfec_payload_type = kUlpfecPayloadType; 269 receive_configs_[0].rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
270 } 270 }
271 receive_configs_[0].rtp.nack.rtp_history_ms = 1000; 271 receive_configs_[0].rtp.nack.rtp_history_ms = 1000;
272 receive_configs_[0].renderer = &observer; 272 receive_configs_[0].renderer = &observer;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 : SendTest(kLongTimeoutMs), 482 : SendTest(kLongTimeoutMs),
483 tested_load_(tested_load), 483 tested_load_(tested_load),
484 encoder_(Clock::GetRealTimeClock(), encode_delay_ms) {} 484 encoder_(Clock::GetRealTimeClock(), encode_delay_ms) {}
485 485
486 void OnLoadUpdate(Load load) override { 486 void OnLoadUpdate(Load load) override {
487 if (load == tested_load_) 487 if (load == tested_load_)
488 observation_complete_->Set(); 488 observation_complete_->Set();
489 } 489 }
490 490
491 Call::Config GetSenderCallConfig() override { 491 Call::Config GetSenderCallConfig() override {
492 Call::Config config(SendTransport()); 492 Call::Config config;
493 config.overuse_callback = this; 493 config.overuse_callback = this;
494 return config; 494 return config;
495 } 495 }
496 496
497 void ModifyConfigs(VideoSendStream::Config* send_config, 497 void ModifyConfigs(VideoSendStream::Config* send_config,
498 std::vector<VideoReceiveStream::Config>* receive_configs, 498 std::vector<VideoReceiveStream::Config>* receive_configs,
499 VideoEncoderConfig* encoder_config) override { 499 VideoEncoderConfig* encoder_config) override {
500 send_config->encoder_settings.encoder = &encoder_; 500 send_config->encoder_settings.encoder = &encoder_;
501 } 501 }
502 502
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 int encoder_inits_; 704 int encoder_inits_;
705 uint32_t last_set_bitrate_; 705 uint32_t last_set_bitrate_;
706 VideoSendStream* send_stream_; 706 VideoSendStream* send_stream_;
707 VideoEncoderConfig encoder_config_; 707 VideoEncoderConfig encoder_config_;
708 } test; 708 } test;
709 709
710 RunBaseTest(&test); 710 RunBaseTest(&test);
711 } 711 }
712 712
713 } // namespace webrtc 713 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/call.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698