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 #include <algorithm> // max | 10 #include <algorithm> // max |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 } | 432 } |
433 | 433 |
434 test::PacketTransport* CreateSendTransport(Call* sender_call) override { | 434 test::PacketTransport* CreateSendTransport(Call* sender_call) override { |
435 // At low RTT (< kLowRttNackMs) -> NACK only, no FEC. | 435 // At low RTT (< kLowRttNackMs) -> NACK only, no FEC. |
436 // Configure some network delay. | 436 // Configure some network delay. |
437 const int kNetworkDelayMs = 100; | 437 const int kNetworkDelayMs = 100; |
438 FakeNetworkPipe::Config config; | 438 FakeNetworkPipe::Config config; |
439 config.loss_percent = 5; | 439 config.loss_percent = 5; |
440 config.queue_delay_ms = kNetworkDelayMs; | 440 config.queue_delay_ms = kNetworkDelayMs; |
441 return new test::PacketTransport(sender_call, this, | 441 return new test::PacketTransport(sender_call, this, |
442 test::PacketTransport::kSender, | 442 test::PacketTransport::kSender, config); |
443 MediaType::VIDEO, config); | |
444 } | 443 } |
445 | 444 |
446 void ModifyVideoConfigs( | 445 void ModifyVideoConfigs( |
447 VideoSendStream::Config* send_config, | 446 VideoSendStream::Config* send_config, |
448 std::vector<VideoReceiveStream::Config>* receive_configs, | 447 std::vector<VideoReceiveStream::Config>* receive_configs, |
449 VideoEncoderConfig* encoder_config) override { | 448 VideoEncoderConfig* encoder_config) override { |
450 if (use_nack_) { | 449 if (use_nack_) { |
451 send_config->rtp.nack.rtp_history_ms = | 450 send_config->rtp.nack.rtp_history_ms = |
452 (*receive_configs)[0].rtp.nack.rtp_history_ms = | 451 (*receive_configs)[0].rtp.nack.rtp_history_ms = |
453 VideoSendStreamTest::kNackRtpHistoryMs; | 452 VideoSendStreamTest::kNackRtpHistoryMs; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 } | 587 } |
589 | 588 |
590 test::PacketTransport* CreateSendTransport(Call* sender_call) override { | 589 test::PacketTransport* CreateSendTransport(Call* sender_call) override { |
591 // At low RTT (< kLowRttNackMs) -> NACK only, no FEC. | 590 // At low RTT (< kLowRttNackMs) -> NACK only, no FEC. |
592 // Therefore we need some network delay. | 591 // Therefore we need some network delay. |
593 const int kNetworkDelayMs = 100; | 592 const int kNetworkDelayMs = 100; |
594 FakeNetworkPipe::Config config; | 593 FakeNetworkPipe::Config config; |
595 config.loss_percent = 5; | 594 config.loss_percent = 5; |
596 config.queue_delay_ms = kNetworkDelayMs; | 595 config.queue_delay_ms = kNetworkDelayMs; |
597 return new test::PacketTransport(sender_call, this, | 596 return new test::PacketTransport(sender_call, this, |
598 test::PacketTransport::kSender, | 597 test::PacketTransport::kSender, config); |
599 MediaType::VIDEO, config); | |
600 } | 598 } |
601 | 599 |
602 void ModifyVideoConfigs( | 600 void ModifyVideoConfigs( |
603 VideoSendStream::Config* send_config, | 601 VideoSendStream::Config* send_config, |
604 std::vector<VideoReceiveStream::Config>* receive_configs, | 602 std::vector<VideoReceiveStream::Config>* receive_configs, |
605 VideoEncoderConfig* encoder_config) override { | 603 VideoEncoderConfig* encoder_config) override { |
606 if (use_nack_) { | 604 if (use_nack_) { |
607 send_config->rtp.nack.rtp_history_ms = | 605 send_config->rtp.nack.rtp_history_ms = |
608 (*receive_configs)[0].rtp.nack.rtp_history_ms = | 606 (*receive_configs)[0].rtp.nack.rtp_history_ms = |
609 VideoSendStreamTest::kNackRtpHistoryMs; | 607 VideoSendStreamTest::kNackRtpHistoryMs; |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 return SEND_PACKET; | 1256 return SEND_PACKET; |
1259 } | 1257 } |
1260 | 1258 |
1261 test::PacketTransport* CreateSendTransport(Call* sender_call) override { | 1259 test::PacketTransport* CreateSendTransport(Call* sender_call) override { |
1262 const int kNetworkDelayMs = 50; | 1260 const int kNetworkDelayMs = 50; |
1263 FakeNetworkPipe::Config config; | 1261 FakeNetworkPipe::Config config; |
1264 config.loss_percent = 10; | 1262 config.loss_percent = 10; |
1265 config.link_capacity_kbps = kCapacityKbps; | 1263 config.link_capacity_kbps = kCapacityKbps; |
1266 config.queue_delay_ms = kNetworkDelayMs; | 1264 config.queue_delay_ms = kNetworkDelayMs; |
1267 return new test::PacketTransport(sender_call, this, | 1265 return new test::PacketTransport(sender_call, this, |
1268 test::PacketTransport::kSender, | 1266 test::PacketTransport::kSender, config); |
1269 MediaType::VIDEO, config); | |
1270 } | 1267 } |
1271 | 1268 |
1272 void ModifyVideoConfigs( | 1269 void ModifyVideoConfigs( |
1273 VideoSendStream::Config* send_config, | 1270 VideoSendStream::Config* send_config, |
1274 std::vector<VideoReceiveStream::Config>* receive_configs, | 1271 std::vector<VideoReceiveStream::Config>* receive_configs, |
1275 VideoEncoderConfig* encoder_config) override { | 1272 VideoEncoderConfig* encoder_config) override { |
1276 // Turn on RTX. | 1273 // Turn on RTX. |
1277 send_config->rtp.rtx.payload_type = kFakeVideoSendPayloadType; | 1274 send_config->rtp.rtx.payload_type = kFakeVideoSendPayloadType; |
1278 send_config->rtp.rtx.ssrcs.push_back(kVideoSendSsrcs[0]); | 1275 send_config->rtp.rtx.ssrcs.push_back(kVideoSendSsrcs[0]); |
1279 } | 1276 } |
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3287 rtc::CriticalSection crit_; | 3284 rtc::CriticalSection crit_; |
3288 uint32_t max_bitrate_bps_ GUARDED_BY(&crit_); | 3285 uint32_t max_bitrate_bps_ GUARDED_BY(&crit_); |
3289 bool first_packet_sent_ GUARDED_BY(&crit_); | 3286 bool first_packet_sent_ GUARDED_BY(&crit_); |
3290 rtc::Event bitrate_changed_event_; | 3287 rtc::Event bitrate_changed_event_; |
3291 } test; | 3288 } test; |
3292 | 3289 |
3293 RunBaseTest(&test); | 3290 RunBaseTest(&test); |
3294 } | 3291 } |
3295 | 3292 |
3296 } // namespace webrtc | 3293 } // namespace webrtc |
OLD | NEW |