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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 TEST_F(VideoSendStreamTest, DoesUtilizeRedForH264WithoutNackEnabled) { | 472 TEST_F(VideoSendStreamTest, DoesUtilizeRedForH264WithoutNackEnabled) { |
473 FecObserver test(false, false, true, "H264"); | 473 FecObserver test(false, false, true, "H264"); |
474 RunBaseTest(&test); | 474 RunBaseTest(&test); |
475 } | 475 } |
476 | 476 |
477 TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp8WithNackEnabled) { | 477 TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp8WithNackEnabled) { |
478 FecObserver test(false, true, true, "VP8"); | 478 FecObserver test(false, true, true, "VP8"); |
479 RunBaseTest(&test); | 479 RunBaseTest(&test); |
480 } | 480 } |
481 | 481 |
| 482 #if !defined(RTC_DISABLE_VP9) |
482 TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp9WithNackEnabled) { | 483 TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp9WithNackEnabled) { |
483 FecObserver test(false, true, true, "VP9"); | 484 FecObserver test(false, true, true, "VP9"); |
484 RunBaseTest(&test); | 485 RunBaseTest(&test); |
485 } | 486 } |
| 487 #endif // !defined(RTC_DISABLE_VP9) |
486 | 488 |
487 void VideoSendStreamTest::TestNackRetransmission( | 489 void VideoSendStreamTest::TestNackRetransmission( |
488 uint32_t retransmit_ssrc, | 490 uint32_t retransmit_ssrc, |
489 uint8_t retransmit_payload_type) { | 491 uint8_t retransmit_payload_type) { |
490 class NackObserver : public test::SendTest { | 492 class NackObserver : public test::SendTest { |
491 public: | 493 public: |
492 explicit NackObserver(uint32_t retransmit_ssrc, | 494 explicit NackObserver(uint32_t retransmit_ssrc, |
493 uint8_t retransmit_payload_type) | 495 uint8_t retransmit_payload_type) |
494 : SendTest(kDefaultTimeoutMs), | 496 : SendTest(kDefaultTimeoutMs), |
495 send_count_(0), | 497 send_count_(0), |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1879 const std::vector<VideoReceiveStream*>& receive_streams) override { | 1881 const std::vector<VideoReceiveStream*>& receive_streams) override { |
1880 send_stream_ = send_stream; | 1882 send_stream_ = send_stream; |
1881 } | 1883 } |
1882 | 1884 |
1883 VideoSendStream* send_stream_; | 1885 VideoSendStream* send_stream_; |
1884 } test; | 1886 } test; |
1885 | 1887 |
1886 RunBaseTest(&test); | 1888 RunBaseTest(&test); |
1887 } | 1889 } |
1888 | 1890 |
| 1891 #if !defined(RTC_DISABLE_VP9) |
1889 class Vp9HeaderObserver : public test::SendTest { | 1892 class Vp9HeaderObserver : public test::SendTest { |
1890 public: | 1893 public: |
1891 Vp9HeaderObserver() | 1894 Vp9HeaderObserver() |
1892 : SendTest(VideoSendStreamTest::kLongTimeoutMs), | 1895 : SendTest(VideoSendStreamTest::kLongTimeoutMs), |
1893 vp9_encoder_(VP9Encoder::Create()), | 1896 vp9_encoder_(VP9Encoder::Create()), |
1894 vp9_settings_(VideoEncoder::GetDefaultVp9Settings()), | 1897 vp9_settings_(VideoEncoder::GetDefaultVp9Settings()), |
1895 packets_sent_(0), | 1898 packets_sent_(0), |
1896 frames_sent_(0) {} | 1899 frames_sent_(0) {} |
1897 | 1900 |
1898 virtual void ModifyVideoConfigsHook( | 1901 virtual void ModifyVideoConfigsHook( |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2286 EXPECT_EQ(kNoTl0PicIdx, vp9_header.tl0_pic_idx); | 2289 EXPECT_EQ(kNoTl0PicIdx, vp9_header.tl0_pic_idx); |
2287 if (vp9_header.inter_pic_predicted) { | 2290 if (vp9_header.inter_pic_predicted) { |
2288 EXPECT_GT(vp9_header.num_ref_pics, 0u); | 2291 EXPECT_GT(vp9_header.num_ref_pics, 0u); |
2289 observation_complete_.Set(); | 2292 observation_complete_.Set(); |
2290 } | 2293 } |
2291 } | 2294 } |
2292 } test; | 2295 } test; |
2293 | 2296 |
2294 RunBaseTest(&test); | 2297 RunBaseTest(&test); |
2295 } | 2298 } |
| 2299 #endif // !defined(RTC_DISABLE_VP9) |
2296 | 2300 |
2297 } // namespace webrtc | 2301 } // namespace webrtc |
OLD | NEW |