| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "webrtc/test/null_transport.h" | 51 #include "webrtc/test/null_transport.h" |
| 52 #include "webrtc/test/rtcp_packet_parser.h" | 52 #include "webrtc/test/rtcp_packet_parser.h" |
| 53 #include "webrtc/test/rtp_rtcp_observer.h" | 53 #include "webrtc/test/rtp_rtcp_observer.h" |
| 54 #include "webrtc/test/testsupport/fileutils.h" | 54 #include "webrtc/test/testsupport/fileutils.h" |
| 55 #include "webrtc/test/testsupport/perf_test.h" | 55 #include "webrtc/test/testsupport/perf_test.h" |
| 56 #include "webrtc/video/transport_adapter.h" | 56 #include "webrtc/video/transport_adapter.h" |
| 57 #include "webrtc/video_encoder.h" | 57 #include "webrtc/video_encoder.h" |
| 58 | 58 |
| 59 namespace webrtc { | 59 namespace webrtc { |
| 60 | 60 |
| 61 // Disable for Asan due to timeout, see bugs.webrtc.org/7047 for | |
| 62 // details. | |
| 63 #if defined(ADDRESS_SANITIZER) | |
| 64 #define MAYBE_ReceivesFlexfecAndSendsCorrespondingRtcp \ | |
| 65 DISABLED_ReceivesFlexfecAndSendsCorrespondingRtcp | |
| 66 #else | |
| 67 #define MAYBE_ReceivesFlexfecAndSendsCorrespondingRtcp \ | |
| 68 ReceivesFlexfecAndSendsCorrespondingRtcp | |
| 69 #endif | |
| 70 | |
| 71 namespace { | 61 namespace { |
| 72 const char new_jb_enabled[] = "WebRTC-NewVideoJitterBuffer/Enabled/"; | 62 const char new_jb_enabled[] = "WebRTC-NewVideoJitterBuffer/Enabled/"; |
| 73 const char new_jb_disabled[] = "WebRTC-NewVideoJitterBuffer/Disabled/"; | 63 const char new_jb_disabled[] = "WebRTC-NewVideoJitterBuffer/Disabled/"; |
| 74 } // anonymous namespace | 64 } // anonymous namespace |
| 75 | 65 |
| 76 static const int kSilenceTimeoutMs = 2000; | 66 static const int kSilenceTimeoutMs = 2000; |
| 77 | 67 |
| 78 class EndToEndTest : public test::CallTest, | 68 class EndToEndTest : public test::CallTest, |
| 79 public ::testing::WithParamInterface<std::string> { | 69 public ::testing::WithParamInterface<std::string> { |
| 80 public: | 70 public: |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 | 596 |
| 607 uint32_t local_ssrc_; | 597 uint32_t local_ssrc_; |
| 608 uint32_t remote_ssrc_; | 598 uint32_t remote_ssrc_; |
| 609 Transport* receive_transport_; | 599 Transport* receive_transport_; |
| 610 rtc::Optional<uint16_t> sequence_number_to_retransmit_; | 600 rtc::Optional<uint16_t> sequence_number_to_retransmit_; |
| 611 } test; | 601 } test; |
| 612 | 602 |
| 613 RunBaseTest(&test); | 603 RunBaseTest(&test); |
| 614 } | 604 } |
| 615 | 605 |
| 616 TEST_P(EndToEndTest, CanReceiveUlpfec) { | 606 // Disable due to failure, see bugs.webrtc.org/7050 for |
| 607 // details. |
| 608 TEST_P(EndToEndTest, DISABLED_CanReceiveUlpfec) { |
| 617 class UlpfecRenderObserver : public test::EndToEndTest, | 609 class UlpfecRenderObserver : public test::EndToEndTest, |
| 618 public rtc::VideoSinkInterface<VideoFrame> { | 610 public rtc::VideoSinkInterface<VideoFrame> { |
| 619 public: | 611 public: |
| 620 UlpfecRenderObserver() | 612 UlpfecRenderObserver() |
| 621 : EndToEndTest(kDefaultTimeoutMs), state_(kFirstPacket) {} | 613 : EndToEndTest(kDefaultTimeoutMs), state_(kFirstPacket) {} |
| 622 | 614 |
| 623 private: | 615 private: |
| 624 Action OnSendRtp(const uint8_t* packet, size_t length) override { | 616 Action OnSendRtp(const uint8_t* packet, size_t length) override { |
| 625 rtc::CritScope lock(&crit_); | 617 rtc::CritScope lock(&crit_); |
| 626 RTPHeader header; | 618 RTPHeader header; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 rtc::CriticalSection crit_; | 814 rtc::CriticalSection crit_; |
| 823 std::set<uint32_t> dropped_sequence_numbers_ GUARDED_BY(crit_); | 815 std::set<uint32_t> dropped_sequence_numbers_ GUARDED_BY(crit_); |
| 824 // Since several packets can have the same timestamp a multiset is used | 816 // Since several packets can have the same timestamp a multiset is used |
| 825 // instead of a set. | 817 // instead of a set. |
| 826 std::multiset<uint32_t> dropped_timestamps_ GUARDED_BY(crit_); | 818 std::multiset<uint32_t> dropped_timestamps_ GUARDED_BY(crit_); |
| 827 const bool expect_flexfec_rtcp_; | 819 const bool expect_flexfec_rtcp_; |
| 828 bool received_flexfec_rtcp_ GUARDED_BY(crit_); | 820 bool received_flexfec_rtcp_ GUARDED_BY(crit_); |
| 829 Random random_; | 821 Random random_; |
| 830 }; | 822 }; |
| 831 | 823 |
| 832 TEST_P(EndToEndTest, ReceivesFlexfec) { | 824 // Disable due to failure, see bugs.webrtc.org/7050 for |
| 825 // details. |
| 826 TEST_P(EndToEndTest, DISABLED_ReceivesFlexfec) { |
| 833 FlexfecRenderObserver test(false); | 827 FlexfecRenderObserver test(false); |
| 834 RunBaseTest(&test); | 828 RunBaseTest(&test); |
| 835 } | 829 } |
| 836 | 830 |
| 837 TEST_P(EndToEndTest, MAYBE_ReceivesFlexfecAndSendsCorrespondingRtcp) { | 831 // Disable due to failure, see bugs.webrtc.org/7050 for |
| 832 // details. |
| 833 TEST_P(EndToEndTest, DISABLED_ReceivesFlexfecAndSendsCorrespondingRtcp) { |
| 838 FlexfecRenderObserver test(true); | 834 FlexfecRenderObserver test(true); |
| 839 RunBaseTest(&test); | 835 RunBaseTest(&test); |
| 840 } | 836 } |
| 841 | 837 |
| 842 TEST_P(EndToEndTest, ReceivedUlpfecPacketsNotNacked) { | 838 TEST_P(EndToEndTest, ReceivedUlpfecPacketsNotNacked) { |
| 843 class UlpfecNackObserver : public test::EndToEndTest { | 839 class UlpfecNackObserver : public test::EndToEndTest { |
| 844 public: | 840 public: |
| 845 UlpfecNackObserver() | 841 UlpfecNackObserver() |
| 846 : EndToEndTest(kDefaultTimeoutMs), | 842 : EndToEndTest(kDefaultTimeoutMs), |
| 847 state_(kFirstPacket), | 843 state_(kFirstPacket), |
| (...skipping 3289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4137 std::unique_ptr<VideoEncoder> encoder_; | 4133 std::unique_ptr<VideoEncoder> encoder_; |
| 4138 std::unique_ptr<VideoDecoder> decoder_; | 4134 std::unique_ptr<VideoDecoder> decoder_; |
| 4139 rtc::CriticalSection crit_; | 4135 rtc::CriticalSection crit_; |
| 4140 int recorded_frames_ GUARDED_BY(crit_); | 4136 int recorded_frames_ GUARDED_BY(crit_); |
| 4141 } test(this); | 4137 } test(this); |
| 4142 | 4138 |
| 4143 RunBaseTest(&test); | 4139 RunBaseTest(&test); |
| 4144 } | 4140 } |
| 4145 | 4141 |
| 4146 } // namespace webrtc | 4142 } // namespace webrtc |
| OLD | NEW |