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

Side by Side Diff: webrtc/video/video_send_stream_tests.cc

Issue 2552713002: Reduce number of FlexFEC VideoSendStreamTests and lower packet loss. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | 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> // max 10 #include <algorithm> // max
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 589 }
590 590
591 return SEND_PACKET; 591 return SEND_PACKET;
592 } 592 }
593 593
594 test::PacketTransport* CreateSendTransport(Call* sender_call) override { 594 test::PacketTransport* CreateSendTransport(Call* sender_call) override {
595 // At low RTT (< kLowRttNackMs) -> NACK only, no FEC. 595 // At low RTT (< kLowRttNackMs) -> NACK only, no FEC.
596 // Therefore we need some network delay. 596 // Therefore we need some network delay.
597 const int kNetworkDelayMs = 100; 597 const int kNetworkDelayMs = 100;
598 FakeNetworkPipe::Config config; 598 FakeNetworkPipe::Config config;
599 config.loss_percent = 50; 599 config.loss_percent = 5;
600 config.queue_delay_ms = kNetworkDelayMs; 600 config.queue_delay_ms = kNetworkDelayMs;
601 return new test::PacketTransport(sender_call, this, 601 return new test::PacketTransport(sender_call, this,
602 test::PacketTransport::kSender, config); 602 test::PacketTransport::kSender, config);
603 } 603 }
604 604
605 void ModifyVideoConfigs( 605 void ModifyVideoConfigs(
606 VideoSendStream::Config* send_config, 606 VideoSendStream::Config* send_config,
607 std::vector<VideoReceiveStream::Config>* receive_configs, 607 std::vector<VideoReceiveStream::Config>* receive_configs,
608 VideoEncoderConfig* encoder_config) override { 608 VideoEncoderConfig* encoder_config) override {
609 transport_adapter_.reset( 609 transport_adapter_.reset(
(...skipping 24 matching lines...) Expand all
634 634
635 std::unique_ptr<internal::TransportAdapter> transport_adapter_; 635 std::unique_ptr<internal::TransportAdapter> transport_adapter_;
636 std::unique_ptr<VideoEncoder> encoder_; 636 std::unique_ptr<VideoEncoder> encoder_;
637 const std::string payload_name_; 637 const std::string payload_name_;
638 const bool use_nack_; 638 const bool use_nack_;
639 bool sent_media_; 639 bool sent_media_;
640 bool sent_flexfec_; 640 bool sent_flexfec_;
641 bool header_extensions_enabled_; 641 bool header_extensions_enabled_;
642 }; 642 };
643 643
644 TEST_F(VideoSendStreamTest, SupportsFlexfecVp8) {
645 FlexfecObserver test(false, false, "VP8");
646 RunBaseTest(&test);
647 }
648
649 TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackVp8) {
650 FlexfecObserver test(false, true, "VP8");
651 RunBaseTest(&test);
652 }
653
644 TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsVp8) { 654 TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsVp8) {
645 FlexfecObserver test(true, false, "VP8"); 655 FlexfecObserver test(true, false, "VP8");
646 RunBaseTest(&test); 656 RunBaseTest(&test);
647 } 657 }
648 658
649 TEST_F(VideoSendStreamTest, SupportsFlexfecWithoutRtpExtensionsVp8) {
650 FlexfecObserver test(false, false, "VP8");
651 RunBaseTest(&test);
652 }
653
654 TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsAndNackVp8) {
655 FlexfecObserver test(true, true, "VP8");
656 RunBaseTest(&test);
657 }
658
659 TEST_F(VideoSendStreamTest, SupportsFlexfecWithoutRtpExtensionsAndNackVp8) {
660 FlexfecObserver test(false, true, "VP8");
661 RunBaseTest(&test);
662 }
663
664 #if !defined(RTC_DISABLE_VP9) 659 #if !defined(RTC_DISABLE_VP9)
665 TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsVp9) { 660 TEST_F(VideoSendStreamTest, SupportsFlexfecVp9) {
666 FlexfecObserver test(true, false, "VP9");
667 RunBaseTest(&test);
668 }
669
670 TEST_F(VideoSendStreamTest, SupportsFlexfecWithoutRtpExtensionsVp9) {
671 FlexfecObserver test(false, false, "VP9"); 661 FlexfecObserver test(false, false, "VP9");
672 RunBaseTest(&test); 662 RunBaseTest(&test);
673 } 663 }
674 664
675 TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsAndNackVp9) { 665 TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackVp9) {
676 FlexfecObserver test(true, true, "VP9");
677 RunBaseTest(&test);
678 }
679
680 TEST_F(VideoSendStreamTest, SupportsFlexfecWithoutRtpExtensionsAndNackVp9) {
681 FlexfecObserver test(false, true, "VP9"); 666 FlexfecObserver test(false, true, "VP9");
682 RunBaseTest(&test); 667 RunBaseTest(&test);
683 } 668 }
684 #endif // defined(RTC_DISABLE_VP9) 669 #endif // defined(RTC_DISABLE_VP9)
685 670
686 TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsH264) { 671 TEST_F(VideoSendStreamTest, SupportsFlexfecH264) {
687 FlexfecObserver test(true, false, "H264");
688 RunBaseTest(&test);
689 }
690
691 TEST_F(VideoSendStreamTest, SupportsFlexfecWithoutRtpExtensionsH264) {
692 FlexfecObserver test(false, false, "H264"); 672 FlexfecObserver test(false, false, "H264");
693 RunBaseTest(&test); 673 RunBaseTest(&test);
694 } 674 }
695 675
696 TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsAndNackH264) { 676 TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackH264) {
697 FlexfecObserver test(true, true, "H264");
698 RunBaseTest(&test);
699 }
700
701 TEST_F(VideoSendStreamTest, SupportsFlexfecWithoutRtpExtensionsAndNackH264) {
702 FlexfecObserver test(false, true, "H264"); 677 FlexfecObserver test(false, true, "H264");
703 RunBaseTest(&test); 678 RunBaseTest(&test);
704 } 679 }
705 680
706 void VideoSendStreamTest::TestNackRetransmission( 681 void VideoSendStreamTest::TestNackRetransmission(
707 uint32_t retransmit_ssrc, 682 uint32_t retransmit_ssrc,
708 uint8_t retransmit_payload_type) { 683 uint8_t retransmit_payload_type) {
709 class NackObserver : public test::SendTest { 684 class NackObserver : public test::SendTest {
710 public: 685 public:
711 explicit NackObserver(uint32_t retransmit_ssrc, 686 explicit NackObserver(uint32_t retransmit_ssrc,
(...skipping 2527 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 private: 3214 private:
3240 Call* call_; 3215 Call* call_;
3241 rtc::CriticalSection crit_; 3216 rtc::CriticalSection crit_;
3242 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_); 3217 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_);
3243 } test; 3218 } test;
3244 3219
3245 RunBaseTest(&test); 3220 RunBaseTest(&test);
3246 } 3221 }
3247 3222
3248 } // namespace webrtc 3223 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698