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> | 10 #include <algorithm> |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 596 |
597 uint32_t local_ssrc_; | 597 uint32_t local_ssrc_; |
598 uint32_t remote_ssrc_; | 598 uint32_t remote_ssrc_; |
599 Transport* receive_transport_; | 599 Transport* receive_transport_; |
600 rtc::Optional<uint16_t> sequence_number_to_retransmit_; | 600 rtc::Optional<uint16_t> sequence_number_to_retransmit_; |
601 } test; | 601 } test; |
602 | 602 |
603 RunBaseTest(&test); | 603 RunBaseTest(&test); |
604 } | 604 } |
605 | 605 |
606 // Disable due to failure, see bugs.webrtc.org/7050 for | 606 // Disabled due to flakyness, see |
607 // details. | 607 // https://bugs.chromium.org/p/webrtc/issues/detail?id=7047. |
608 TEST_P(EndToEndTest, DISABLED_CanReceiveUlpfec) { | 608 TEST_P(EndToEndTest, DISABLED_ReceivesUlpfec) { |
609 class UlpfecRenderObserver : public test::EndToEndTest, | 609 class UlpfecRenderObserver : public test::EndToEndTest, |
610 public rtc::VideoSinkInterface<VideoFrame> { | 610 public rtc::VideoSinkInterface<VideoFrame> { |
611 public: | 611 public: |
612 UlpfecRenderObserver() | 612 UlpfecRenderObserver() |
613 : EndToEndTest(kDefaultTimeoutMs), state_(kFirstPacket) {} | 613 : EndToEndTest(kDefaultTimeoutMs), |
| 614 random_(0xcafef00d1), |
| 615 num_packets_sent_(0) {} |
614 | 616 |
615 private: | 617 private: |
616 Action OnSendRtp(const uint8_t* packet, size_t length) override { | 618 Action OnSendRtp(const uint8_t* packet, size_t length) override { |
617 rtc::CritScope lock(&crit_); | 619 rtc::CritScope lock(&crit_); |
618 RTPHeader header; | 620 RTPHeader header; |
619 EXPECT_TRUE(parser_->Parse(packet, length, &header)); | 621 EXPECT_TRUE(parser_->Parse(packet, length, &header)); |
620 | 622 |
| 623 EXPECT_TRUE(header.payloadType == kFakeVideoSendPayloadType || |
| 624 header.payloadType == kRedPayloadType) |
| 625 << "Unknown payload type received."; |
| 626 EXPECT_EQ(kVideoSendSsrcs[0], header.ssrc) << "Unknown SSRC received."; |
| 627 |
| 628 // Parse RED header. |
621 int encapsulated_payload_type = -1; | 629 int encapsulated_payload_type = -1; |
622 if (header.payloadType == kRedPayloadType) { | 630 if (header.payloadType == kRedPayloadType) { |
623 encapsulated_payload_type = | 631 encapsulated_payload_type = |
624 static_cast<int>(packet[header.headerLength]); | 632 static_cast<int>(packet[header.headerLength]); |
625 if (encapsulated_payload_type != kFakeVideoSendPayloadType) | 633 |
626 EXPECT_EQ(kUlpfecPayloadType, encapsulated_payload_type); | 634 EXPECT_TRUE(encapsulated_payload_type == kFakeVideoSendPayloadType || |
627 } else { | 635 encapsulated_payload_type == kUlpfecPayloadType) |
628 EXPECT_EQ(kFakeVideoSendPayloadType, header.payloadType); | 636 << "Unknown encapsulated payload type received."; |
629 } | 637 } |
630 | 638 |
631 if (protected_sequence_numbers_.count(header.sequenceNumber) != 0) { | 639 // To reduce test flakiness, always let ULPFEC packets through. |
632 // Retransmitted packet, should not count. | 640 if (encapsulated_payload_type == kUlpfecPayloadType) { |
633 protected_sequence_numbers_.erase(header.sequenceNumber); | |
634 auto ts_it = protected_timestamps_.find(header.timestamp); | |
635 EXPECT_NE(ts_it, protected_timestamps_.end()); | |
636 protected_timestamps_.erase(ts_it); | |
637 return SEND_PACKET; | 641 return SEND_PACKET; |
638 } | 642 } |
639 | 643 |
640 switch (state_) { | 644 // Simulate 5% video packet loss after rampup period. Record the |
641 case kFirstPacket: | 645 // corresponding timestamps that were dropped. |
642 state_ = kDropEveryOtherPacketUntilUlpfec; | 646 if (num_packets_sent_++ > 100 && random_.Rand(1, 100) <= 5) { |
643 break; | 647 if (encapsulated_payload_type == kFakeVideoSendPayloadType) { |
644 case kDropEveryOtherPacketUntilUlpfec: | 648 dropped_sequence_numbers_.insert(header.sequenceNumber); |
645 if (encapsulated_payload_type == kUlpfecPayloadType) { | 649 dropped_timestamps_.insert(header.timestamp); |
646 state_ = kDropNextMediaPacket; | 650 } |
647 return SEND_PACKET; | 651 |
648 } | 652 return DROP_PACKET; |
649 if (header.sequenceNumber % 2 == 0) | |
650 return DROP_PACKET; | |
651 break; | |
652 case kDropNextMediaPacket: | |
653 if (encapsulated_payload_type == kFakeVideoSendPayloadType) { | |
654 protected_sequence_numbers_.insert(header.sequenceNumber); | |
655 protected_timestamps_.insert(header.timestamp); | |
656 state_ = kDropEveryOtherPacketUntilUlpfec; | |
657 return DROP_PACKET; | |
658 } | |
659 break; | |
660 } | 653 } |
661 | 654 |
662 return SEND_PACKET; | 655 return SEND_PACKET; |
663 } | 656 } |
664 | 657 |
665 void OnFrame(const VideoFrame& video_frame) override { | 658 void OnFrame(const VideoFrame& video_frame) override { |
666 rtc::CritScope lock(&crit_); | 659 rtc::CritScope lock(&crit_); |
667 // Rendering frame with timestamp of packet that was dropped -> FEC | 660 // Rendering frame with timestamp of packet that was dropped -> FEC |
668 // protection worked. | 661 // protection worked. |
669 if (protected_timestamps_.count(video_frame.timestamp()) != 0) | 662 auto it = dropped_timestamps_.find(video_frame.timestamp()); |
| 663 if (it != dropped_timestamps_.end()) { |
670 observation_complete_.Set(); | 664 observation_complete_.Set(); |
| 665 } |
671 } | 666 } |
672 | 667 |
673 enum { | |
674 kFirstPacket, | |
675 kDropEveryOtherPacketUntilUlpfec, | |
676 kDropNextMediaPacket, | |
677 } state_; | |
678 | |
679 void ModifyVideoConfigs( | 668 void ModifyVideoConfigs( |
680 VideoSendStream::Config* send_config, | 669 VideoSendStream::Config* send_config, |
681 std::vector<VideoReceiveStream::Config>* receive_configs, | 670 std::vector<VideoReceiveStream::Config>* receive_configs, |
682 VideoEncoderConfig* encoder_config) override { | 671 VideoEncoderConfig* encoder_config) override { |
683 // TODO(pbos): Run this test with combined NACK/ULPFEC enabled as well. | 672 send_config->rtp.extensions.push_back( |
684 // int rtp_history_ms = 1000; | 673 RtpExtension(RtpExtension::kTransportSequenceNumberUri, |
685 // (*receive_configs)[0].rtp.nack.rtp_history_ms = rtp_history_ms; | 674 test::kTransportSequenceNumberExtensionId)); |
686 // send_config->rtp.nack.rtp_history_ms = rtp_history_ms; | |
687 send_config->rtp.ulpfec.red_payload_type = kRedPayloadType; | 675 send_config->rtp.ulpfec.red_payload_type = kRedPayloadType; |
688 send_config->rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; | 676 send_config->rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; |
689 | 677 |
| 678 (*receive_configs)[0].rtp.transport_cc = true; |
690 (*receive_configs)[0].rtp.ulpfec.red_payload_type = kRedPayloadType; | 679 (*receive_configs)[0].rtp.ulpfec.red_payload_type = kRedPayloadType; |
691 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; | 680 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; |
692 (*receive_configs)[0].renderer = this; | 681 (*receive_configs)[0].renderer = this; |
693 } | 682 } |
694 | 683 |
695 void PerformTest() override { | 684 void PerformTest() override { |
696 EXPECT_TRUE(Wait()) | 685 EXPECT_TRUE(Wait()) |
697 << "Timed out waiting for dropped frames to be rendered."; | 686 << "Timed out waiting for dropped frames to be rendered."; |
698 } | 687 } |
699 | 688 |
700 rtc::CriticalSection crit_; | 689 rtc::CriticalSection crit_; |
701 std::set<uint32_t> protected_sequence_numbers_ GUARDED_BY(crit_); | 690 std::set<uint32_t> dropped_sequence_numbers_ GUARDED_BY(crit_); |
702 // Since several packets can have the same timestamp a multiset is used | 691 // Several packets can have the same timestamp. |
703 // instead of a set. | 692 std::multiset<uint32_t> dropped_timestamps_ GUARDED_BY(crit_); |
704 std::multiset<uint32_t> protected_timestamps_ GUARDED_BY(crit_); | 693 Random random_; |
| 694 int num_packets_sent_; |
705 } test; | 695 } test; |
706 | 696 |
707 RunBaseTest(&test); | 697 RunBaseTest(&test); |
708 } | 698 } |
709 | 699 |
710 class FlexfecRenderObserver : public test::EndToEndTest, | 700 class FlexfecRenderObserver : public test::EndToEndTest, |
711 public rtc::VideoSinkInterface<VideoFrame> { | 701 public rtc::VideoSinkInterface<VideoFrame> { |
712 public: | 702 public: |
713 static constexpr uint32_t kVideoLocalSsrc = 123; | 703 static constexpr uint32_t kVideoLocalSsrc = 123; |
714 static constexpr uint32_t kFlexfecLocalSsrc = 456; | 704 static constexpr uint32_t kFlexfecLocalSsrc = 456; |
715 | 705 |
716 explicit FlexfecRenderObserver(bool expect_flexfec_rtcp) | 706 explicit FlexfecRenderObserver(bool enable_nack, bool expect_flexfec_rtcp) |
717 : test::EndToEndTest(test::CallTest::kDefaultTimeoutMs), | 707 : test::EndToEndTest(test::CallTest::kDefaultTimeoutMs), |
| 708 enable_nack_(enable_nack), |
718 expect_flexfec_rtcp_(expect_flexfec_rtcp), | 709 expect_flexfec_rtcp_(expect_flexfec_rtcp), |
719 received_flexfec_rtcp_(false), | 710 received_flexfec_rtcp_(false), |
720 random_(0xcafef00d1) {} | 711 random_(0xcafef00d1), |
| 712 num_packets_sent_(0) {} |
721 | 713 |
722 size_t GetNumFlexfecStreams() const override { return 1; } | 714 size_t GetNumFlexfecStreams() const override { return 1; } |
723 | 715 |
724 private: | 716 private: |
725 Action OnSendRtp(const uint8_t* packet, size_t length) override { | 717 Action OnSendRtp(const uint8_t* packet, size_t length) override { |
726 rtc::CritScope lock(&crit_); | 718 rtc::CritScope lock(&crit_); |
727 RTPHeader header; | 719 RTPHeader header; |
728 EXPECT_TRUE(parser_->Parse(packet, length, &header)); | 720 EXPECT_TRUE(parser_->Parse(packet, length, &header)); |
729 | 721 |
730 uint8_t payload_type = header.payloadType; | 722 EXPECT_TRUE(header.payloadType == |
731 if (payload_type != test::CallTest::kFakeVideoSendPayloadType) { | 723 test::CallTest::kFakeVideoSendPayloadType || |
732 EXPECT_EQ(test::CallTest::kFlexfecPayloadType, payload_type); | 724 header.payloadType == test::CallTest::kFlexfecPayloadType || |
| 725 (enable_nack_ && |
| 726 header.payloadType == test::CallTest::kSendRtxPayloadType)) |
| 727 << "Unknown payload type received."; |
| 728 EXPECT_TRUE( |
| 729 header.ssrc == test::CallTest::kVideoSendSsrcs[0] || |
| 730 header.ssrc == test::CallTest::kFlexfecSendSsrc || |
| 731 (enable_nack_ && header.ssrc == test::CallTest::kSendRtxSsrcs[0])) |
| 732 << "Unknown SSRC received."; |
| 733 |
| 734 // To reduce test flakiness, always let FlexFEC packets through. |
| 735 if (header.payloadType == test::CallTest::kFlexfecPayloadType) { |
| 736 EXPECT_EQ(test::CallTest::kFlexfecSendSsrc, header.ssrc); |
| 737 |
| 738 return SEND_PACKET; |
733 } | 739 } |
734 | 740 |
735 // Is this a retransmitted media packet? From the perspective of FEC, this | 741 // To reduce test flakiness, always let RTX packets through. |
736 // packet is then no longer dropped, so remove it from the list of | 742 if (header.payloadType == test::CallTest::kSendRtxPayloadType) { |
737 // dropped packets. | 743 EXPECT_EQ(test::CallTest::kSendRtxSsrcs[0], header.ssrc); |
738 if (payload_type == test::CallTest::kFakeVideoSendPayloadType) { | 744 |
739 auto seq_num_it = dropped_sequence_numbers_.find(header.sequenceNumber); | 745 // Parse RTX header. |
| 746 uint16_t original_sequence_number = |
| 747 ByteReader<uint16_t>::ReadBigEndian(&packet[header.headerLength]); |
| 748 |
| 749 // From the perspective of FEC, a retransmitted packet is no longer |
| 750 // dropped, so remove it from list of dropped packets. |
| 751 auto seq_num_it = |
| 752 dropped_sequence_numbers_.find(original_sequence_number); |
740 if (seq_num_it != dropped_sequence_numbers_.end()) { | 753 if (seq_num_it != dropped_sequence_numbers_.end()) { |
741 dropped_sequence_numbers_.erase(seq_num_it); | 754 dropped_sequence_numbers_.erase(seq_num_it); |
742 auto ts_it = dropped_timestamps_.find(header.timestamp); | 755 auto ts_it = dropped_timestamps_.find(header.timestamp); |
743 EXPECT_NE(ts_it, dropped_timestamps_.end()); | 756 EXPECT_NE(ts_it, dropped_timestamps_.end()); |
744 dropped_timestamps_.erase(ts_it); | 757 dropped_timestamps_.erase(ts_it); |
| 758 } |
745 | 759 |
746 return SEND_PACKET; | 760 return SEND_PACKET; |
747 } | |
748 } | 761 } |
749 | 762 |
750 // Simulate 5% packet loss. Record what media packets, and corresponding | 763 // Simulate 5% video packet loss after rampup period. Record the |
751 // timestamps, that were dropped. | 764 // corresponding timestamps that were dropped. |
752 if (random_.Rand(1, 100) <= 5) { | 765 if (num_packets_sent_++ > 100 && random_.Rand(1, 100) <= 5) { |
753 if (payload_type == test::CallTest::kFakeVideoSendPayloadType) { | 766 EXPECT_EQ(test::CallTest::kFakeVideoSendPayloadType, header.payloadType); |
754 dropped_sequence_numbers_.insert(header.sequenceNumber); | 767 EXPECT_EQ(test::CallTest::kVideoSendSsrcs[0], header.ssrc); |
755 dropped_timestamps_.insert(header.timestamp); | 768 |
756 } | 769 dropped_sequence_numbers_.insert(header.sequenceNumber); |
| 770 dropped_timestamps_.insert(header.timestamp); |
757 | 771 |
758 return DROP_PACKET; | 772 return DROP_PACKET; |
759 } | 773 } |
760 | 774 |
761 return SEND_PACKET; | 775 return SEND_PACKET; |
762 } | 776 } |
763 | 777 |
764 Action OnReceiveRtcp(const uint8_t* data, size_t length) override { | 778 Action OnReceiveRtcp(const uint8_t* data, size_t length) override { |
765 test::RtcpPacketParser parser; | 779 test::RtcpPacketParser parser; |
766 | 780 |
767 parser.Parse(data, length); | 781 parser.Parse(data, length); |
768 if (parser.sender_ssrc() == kFlexfecLocalSsrc) { | 782 if (parser.sender_ssrc() == kFlexfecLocalSsrc) { |
769 EXPECT_EQ(1, parser.receiver_report()->num_packets()); | 783 EXPECT_EQ(1, parser.receiver_report()->num_packets()); |
770 const std::vector<rtcp::ReportBlock>& report_blocks = | 784 const std::vector<rtcp::ReportBlock>& report_blocks = |
771 parser.receiver_report()->report_blocks(); | 785 parser.receiver_report()->report_blocks(); |
772 if (!report_blocks.empty()) { | 786 if (!report_blocks.empty()) { |
773 EXPECT_EQ(1U, report_blocks.size()); | 787 EXPECT_EQ(1U, report_blocks.size()); |
774 EXPECT_EQ(test::CallTest::kFlexfecSendSsrc, | 788 EXPECT_EQ(test::CallTest::kFlexfecSendSsrc, |
775 report_blocks[0].source_ssrc()); | 789 report_blocks[0].source_ssrc()); |
776 rtc::CritScope lock(&crit_); | 790 rtc::CritScope lock(&crit_); |
777 received_flexfec_rtcp_ = true; | 791 received_flexfec_rtcp_ = true; |
778 } | 792 } |
779 } | 793 } |
780 | 794 |
781 return SEND_PACKET; | 795 return SEND_PACKET; |
782 } | 796 } |
783 | 797 |
| 798 test::PacketTransport* CreateSendTransport(Call* sender_call) override { |
| 799 // At low RTT (< kLowRttNackMs) -> NACK only, no FEC. |
| 800 const int kNetworkDelayMs = 100; |
| 801 FakeNetworkPipe::Config config; |
| 802 config.queue_delay_ms = kNetworkDelayMs; |
| 803 return new test::PacketTransport(sender_call, this, |
| 804 test::PacketTransport::kSender, config); |
| 805 } |
| 806 |
784 void OnFrame(const VideoFrame& video_frame) override { | 807 void OnFrame(const VideoFrame& video_frame) override { |
785 rtc::CritScope lock(&crit_); | 808 rtc::CritScope lock(&crit_); |
786 // Rendering frame with timestamp of packet that was dropped -> FEC | 809 // Rendering frame with timestamp of packet that was dropped -> FEC |
787 // protection worked. | 810 // protection worked. |
788 auto it = dropped_timestamps_.find(video_frame.timestamp()); | 811 auto it = dropped_timestamps_.find(video_frame.timestamp()); |
789 if (it != dropped_timestamps_.end()) { | 812 if (it != dropped_timestamps_.end()) { |
790 if (!expect_flexfec_rtcp_ || received_flexfec_rtcp_) { | 813 if (!expect_flexfec_rtcp_ || received_flexfec_rtcp_) { |
791 observation_complete_.Set(); | 814 observation_complete_.Set(); |
792 } | 815 } |
793 } | 816 } |
794 } | 817 } |
795 | 818 |
796 void ModifyVideoConfigs( | 819 void ModifyVideoConfigs( |
797 VideoSendStream::Config* send_config, | 820 VideoSendStream::Config* send_config, |
798 std::vector<VideoReceiveStream::Config>* receive_configs, | 821 std::vector<VideoReceiveStream::Config>* receive_configs, |
799 VideoEncoderConfig* encoder_config) override { | 822 VideoEncoderConfig* encoder_config) override { |
| 823 send_config->rtp.extensions.push_back( |
| 824 RtpExtension(RtpExtension::kTransportSequenceNumberUri, |
| 825 test::kTransportSequenceNumberExtensionId)); |
| 826 |
800 (*receive_configs)[0].rtp.local_ssrc = kVideoLocalSsrc; | 827 (*receive_configs)[0].rtp.local_ssrc = kVideoLocalSsrc; |
| 828 (*receive_configs)[0].rtp.transport_cc = true; |
801 (*receive_configs)[0].renderer = this; | 829 (*receive_configs)[0].renderer = this; |
| 830 |
| 831 if (enable_nack_) { |
| 832 send_config->rtp.nack.rtp_history_ms = test::CallTest::kNackRtpHistoryMs; |
| 833 send_config->rtp.ulpfec.red_rtx_payload_type = |
| 834 test::CallTest::kRtxRedPayloadType; |
| 835 send_config->rtp.rtx.ssrcs.push_back(test::CallTest::kSendRtxSsrcs[0]); |
| 836 send_config->rtp.rtx.payload_type = test::CallTest::kSendRtxPayloadType; |
| 837 |
| 838 (*receive_configs)[0].rtp.nack.rtp_history_ms = |
| 839 test::CallTest::kNackRtpHistoryMs; |
| 840 (*receive_configs)[0].rtp.ulpfec.red_rtx_payload_type = |
| 841 test::CallTest::kRtxRedPayloadType; |
| 842 |
| 843 (*receive_configs)[0].rtp.rtx_ssrc = test::CallTest::kSendRtxSsrcs[0]; |
| 844 (*receive_configs)[0] |
| 845 .rtp.rtx_payload_types[test::CallTest::kVideoSendPayloadType] = |
| 846 test::CallTest::kSendRtxPayloadType; |
| 847 } |
802 } | 848 } |
803 | 849 |
804 void ModifyFlexfecConfigs( | 850 void ModifyFlexfecConfigs( |
805 std::vector<FlexfecReceiveStream::Config>* receive_configs) override { | 851 std::vector<FlexfecReceiveStream::Config>* receive_configs) override { |
806 (*receive_configs)[0].local_ssrc = kFlexfecLocalSsrc; | 852 (*receive_configs)[0].local_ssrc = kFlexfecLocalSsrc; |
807 } | 853 } |
808 | 854 |
809 void PerformTest() override { | 855 void PerformTest() override { |
810 EXPECT_TRUE(Wait()) | 856 EXPECT_TRUE(Wait()) |
811 << "Timed out waiting for dropped frames to be rendered."; | 857 << "Timed out waiting for dropped frames to be rendered."; |
812 } | 858 } |
813 | 859 |
814 rtc::CriticalSection crit_; | 860 rtc::CriticalSection crit_; |
815 std::set<uint32_t> dropped_sequence_numbers_ GUARDED_BY(crit_); | 861 std::set<uint32_t> dropped_sequence_numbers_ GUARDED_BY(crit_); |
816 // Since several packets can have the same timestamp a multiset is used | 862 // Several packets can have the same timestamp. |
817 // instead of a set. | |
818 std::multiset<uint32_t> dropped_timestamps_ GUARDED_BY(crit_); | 863 std::multiset<uint32_t> dropped_timestamps_ GUARDED_BY(crit_); |
| 864 const bool enable_nack_; |
819 const bool expect_flexfec_rtcp_; | 865 const bool expect_flexfec_rtcp_; |
820 bool received_flexfec_rtcp_ GUARDED_BY(crit_); | 866 bool received_flexfec_rtcp_ GUARDED_BY(crit_); |
821 Random random_; | 867 Random random_; |
| 868 int num_packets_sent_; |
822 }; | 869 }; |
823 | 870 |
824 // Disable due to failure, see bugs.webrtc.org/7050 for | 871 TEST_P(EndToEndTest, RecoversWithFlexfec) { |
825 // details. | 872 FlexfecRenderObserver test(false, false); |
826 TEST_P(EndToEndTest, DISABLED_ReceivesFlexfec) { | |
827 FlexfecRenderObserver test(false); | |
828 RunBaseTest(&test); | 873 RunBaseTest(&test); |
829 } | 874 } |
830 | 875 |
831 // Disable due to failure, see bugs.webrtc.org/7050 for | 876 TEST_P(EndToEndTest, RecoversWithFlexfecAndNack) { |
832 // details. | 877 FlexfecRenderObserver test(true, false); |
833 TEST_P(EndToEndTest, DISABLED_ReceivesFlexfecAndSendsCorrespondingRtcp) { | |
834 FlexfecRenderObserver test(true); | |
835 RunBaseTest(&test); | 878 RunBaseTest(&test); |
836 } | 879 } |
837 | 880 |
| 881 TEST_P(EndToEndTest, RecoversWithFlexfecAndSendsCorrespondingRtcp) { |
| 882 FlexfecRenderObserver test(false, true); |
| 883 RunBaseTest(&test); |
| 884 } |
| 885 |
838 TEST_P(EndToEndTest, ReceivedUlpfecPacketsNotNacked) { | 886 TEST_P(EndToEndTest, ReceivedUlpfecPacketsNotNacked) { |
839 class UlpfecNackObserver : public test::EndToEndTest { | 887 class UlpfecNackObserver : public test::EndToEndTest { |
840 public: | 888 public: |
841 UlpfecNackObserver() | 889 UlpfecNackObserver() |
842 : EndToEndTest(kDefaultTimeoutMs), | 890 : EndToEndTest(kDefaultTimeoutMs), |
843 state_(kFirstPacket), | 891 state_(kFirstPacket), |
844 ulpfec_sequence_number_(0), | 892 ulpfec_sequence_number_(0), |
845 has_last_sequence_number_(false), | 893 has_last_sequence_number_(false), |
846 last_sequence_number_(0), | 894 last_sequence_number_(0), |
847 encoder_(VP8Encoder::Create()), | 895 encoder_(VP8Encoder::Create()), |
(...skipping 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4126 std::unique_ptr<VideoEncoder> encoder_; | 4174 std::unique_ptr<VideoEncoder> encoder_; |
4127 std::unique_ptr<VideoDecoder> decoder_; | 4175 std::unique_ptr<VideoDecoder> decoder_; |
4128 rtc::CriticalSection crit_; | 4176 rtc::CriticalSection crit_; |
4129 int recorded_frames_ GUARDED_BY(crit_); | 4177 int recorded_frames_ GUARDED_BY(crit_); |
4130 } test(this); | 4178 } test(this); |
4131 | 4179 |
4132 RunBaseTest(&test); | 4180 RunBaseTest(&test); |
4133 } | 4181 } |
4134 | 4182 |
4135 } // namespace webrtc | 4183 } // namespace webrtc |
OLD | NEW |