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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 UlpfecObserver test(true, false, true, true, "VP8", encoder.get()); | 547 UlpfecObserver test(true, false, true, true, "VP8", encoder.get()); |
548 RunBaseTest(&test); | 548 RunBaseTest(&test); |
549 } | 549 } |
550 | 550 |
551 TEST_F(VideoSendStreamTest, SupportsUlpfecWithoutExtensions) { | 551 TEST_F(VideoSendStreamTest, SupportsUlpfecWithoutExtensions) { |
552 std::unique_ptr<VideoEncoder> encoder(VP8Encoder::Create()); | 552 std::unique_ptr<VideoEncoder> encoder(VP8Encoder::Create()); |
553 UlpfecObserver test(false, false, true, true, "VP8", encoder.get()); | 553 UlpfecObserver test(false, false, true, true, "VP8", encoder.get()); |
554 RunBaseTest(&test); | 554 RunBaseTest(&test); |
555 } | 555 } |
556 | 556 |
| 557 class VideoSendStreamWithoutUlpfecTest : public VideoSendStreamTest { |
| 558 protected: |
| 559 VideoSendStreamWithoutUlpfecTest() |
| 560 : field_trial_("WebRTC-DisableUlpFecExperiment/Enabled/") {} |
| 561 |
| 562 test::ScopedFieldTrials field_trial_; |
| 563 }; |
| 564 |
| 565 TEST_F(VideoSendStreamWithoutUlpfecTest, NoUlpfecIfDisabledThroughFieldTrial) { |
| 566 std::unique_ptr<VideoEncoder> encoder(VP8Encoder::Create()); |
| 567 UlpfecObserver test(false, false, true, false, "VP8", encoder.get()); |
| 568 RunBaseTest(&test); |
| 569 } |
| 570 |
557 // The FEC scheme used is not efficient for H264, so we should not use RED/FEC | 571 // The FEC scheme used is not efficient for H264, so we should not use RED/FEC |
558 // since we'll still have to re-request FEC packets, effectively wasting | 572 // since we'll still have to re-request FEC packets, effectively wasting |
559 // bandwidth since the receiver has to wait for FEC retransmissions to determine | 573 // bandwidth since the receiver has to wait for FEC retransmissions to determine |
560 // that the received state is actually decodable. | 574 // that the received state is actually decodable. |
561 TEST_F(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) { | 575 TEST_F(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) { |
562 std::unique_ptr<VideoEncoder> encoder( | 576 std::unique_ptr<VideoEncoder> encoder( |
563 new test::FakeH264Encoder(Clock::GetRealTimeClock())); | 577 new test::FakeH264Encoder(Clock::GetRealTimeClock())); |
564 UlpfecObserver test(false, true, true, false, "H264", encoder.get()); | 578 UlpfecObserver test(false, true, true, false, "H264", encoder.get()); |
565 RunBaseTest(&test); | 579 RunBaseTest(&test); |
566 } | 580 } |
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3490 capturer_ = frame_generator_capturer; | 3504 capturer_ = frame_generator_capturer; |
3491 } | 3505 } |
3492 | 3506 |
3493 test::FrameGeneratorCapturer* capturer_ = nullptr; | 3507 test::FrameGeneratorCapturer* capturer_ = nullptr; |
3494 } test; | 3508 } test; |
3495 | 3509 |
3496 RunBaseTest(&test); | 3510 RunBaseTest(&test); |
3497 } | 3511 } |
3498 | 3512 |
3499 } // namespace webrtc | 3513 } // namespace webrtc |
OLD | NEW |