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