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