| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 cricket::VideoFormat capture_format_hd = (*formats)[0]; | 882 cricket::VideoFormat capture_format_hd = (*formats)[0]; |
| 883 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format_hd)); | 883 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format_hd)); |
| 884 EXPECT_TRUE(channel_->SetCapturer(kSsrc, video_capturer_.get())); | 884 EXPECT_TRUE(channel_->SetCapturer(kSsrc, video_capturer_.get())); |
| 885 | 885 |
| 886 // Capture format HD -> adapt (OnOutputFormatRequest VGA) -> VGA. | 886 // Capture format HD -> adapt (OnOutputFormatRequest VGA) -> VGA. |
| 887 cricket::VideoCodec codec = kVp8Codec720p; | 887 cricket::VideoCodec codec = kVp8Codec720p; |
| 888 EXPECT_TRUE(SetOneCodec(codec)); | 888 EXPECT_TRUE(SetOneCodec(codec)); |
| 889 codec.width /= 2; | 889 codec.width /= 2; |
| 890 codec.height /= 2; | 890 codec.height /= 2; |
| 891 EXPECT_TRUE(SetSend(true)); | 891 EXPECT_TRUE(SetSend(true)); |
| 892 EXPECT_TRUE(channel_->SetRender(true)); | |
| 893 EXPECT_EQ(0, renderer_.num_rendered_frames()); | 892 EXPECT_EQ(0, renderer_.num_rendered_frames()); |
| 894 EXPECT_TRUE(SendFrame()); | 893 EXPECT_TRUE(SendFrame()); |
| 895 EXPECT_FRAME_WAIT(1, codec.width, codec.height, kTimeout); | 894 EXPECT_FRAME_WAIT(1, codec.width, codec.height, kTimeout); |
| 896 } | 895 } |
| 897 | 896 |
| 898 class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test { | 897 class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test { |
| 899 public: | 898 public: |
| 900 WebRtcVideoChannel2Test() : last_ssrc_(0) {} | 899 WebRtcVideoChannel2Test() : last_ssrc_(0) {} |
| 901 void SetUp() override { | 900 void SetUp() override { |
| 902 fake_call_.reset(new FakeCall(webrtc::Call::Config())); | 901 fake_call_.reset(new FakeCall(webrtc::Call::Config())); |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 } | 1450 } |
| 1452 | 1451 |
| 1453 TEST_F(WebRtcVideoChannel2Test, DISABLED_HybridNackFecConference) { | 1452 TEST_F(WebRtcVideoChannel2Test, DISABLED_HybridNackFecConference) { |
| 1454 FAIL() << "Not implemented."; // TODO(pbos): Implement. | 1453 FAIL() << "Not implemented."; // TODO(pbos): Implement. |
| 1455 } | 1454 } |
| 1456 | 1455 |
| 1457 TEST_F(WebRtcVideoChannel2Test, DISABLED_AddRemoveRecvStreamConference) { | 1456 TEST_F(WebRtcVideoChannel2Test, DISABLED_AddRemoveRecvStreamConference) { |
| 1458 FAIL() << "Not implemented."; // TODO(pbos): Implement. | 1457 FAIL() << "Not implemented."; // TODO(pbos): Implement. |
| 1459 } | 1458 } |
| 1460 | 1459 |
| 1461 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetRender) { | |
| 1462 FAIL() << "Not implemented."; // TODO(pbos): Implement. | |
| 1463 } | |
| 1464 | |
| 1465 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAuto) { | 1460 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAuto) { |
| 1466 FAIL() << "Not implemented."; // TODO(pbos): Implement. | 1461 FAIL() << "Not implemented."; // TODO(pbos): Implement. |
| 1467 } | 1462 } |
| 1468 | 1463 |
| 1469 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAutoCapped) { | 1464 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAutoCapped) { |
| 1470 FAIL() << "Not implemented."; // TODO(pbos): Implement. | 1465 FAIL() << "Not implemented."; // TODO(pbos): Implement. |
| 1471 } | 1466 } |
| 1472 | 1467 |
| 1473 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthFixed) { | 1468 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthFixed) { |
| 1474 FAIL() << "Not implemented."; // TODO(pbos): Implement. | 1469 FAIL() << "Not implemented."; // TODO(pbos): Implement. |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1818 TEST_F(WebRtcVideoChannel2Test, EstimatesNtpStartTimeAndElapsedTimeCorrectly) { | 1813 TEST_F(WebRtcVideoChannel2Test, EstimatesNtpStartTimeAndElapsedTimeCorrectly) { |
| 1819 // Start at last timestamp to verify that wraparounds are estimated correctly. | 1814 // Start at last timestamp to verify that wraparounds are estimated correctly. |
| 1820 static const uint32_t kInitialTimestamp = 0xFFFFFFFFu; | 1815 static const uint32_t kInitialTimestamp = 0xFFFFFFFFu; |
| 1821 static const int64_t kInitialNtpTimeMs = 1247891230; | 1816 static const int64_t kInitialNtpTimeMs = 1247891230; |
| 1822 static const int kFrameOffsetMs = 20; | 1817 static const int kFrameOffsetMs = 20; |
| 1823 EXPECT_TRUE(channel_->SetRecvParameters(recv_parameters_)); | 1818 EXPECT_TRUE(channel_->SetRecvParameters(recv_parameters_)); |
| 1824 | 1819 |
| 1825 FakeVideoReceiveStream* stream = AddRecvStream(); | 1820 FakeVideoReceiveStream* stream = AddRecvStream(); |
| 1826 cricket::FakeVideoRenderer renderer; | 1821 cricket::FakeVideoRenderer renderer; |
| 1827 EXPECT_TRUE(channel_->SetRenderer(last_ssrc_, &renderer)); | 1822 EXPECT_TRUE(channel_->SetRenderer(last_ssrc_, &renderer)); |
| 1828 EXPECT_TRUE(channel_->SetRender(true)); | |
| 1829 | 1823 |
| 1830 webrtc::VideoFrame video_frame; | 1824 webrtc::VideoFrame video_frame; |
| 1831 CreateBlackFrame(&video_frame, 4, 4); | 1825 CreateBlackFrame(&video_frame, 4, 4); |
| 1832 video_frame.set_timestamp(kInitialTimestamp); | 1826 video_frame.set_timestamp(kInitialTimestamp); |
| 1833 // Initial NTP time is not available on the first frame, but should still be | 1827 // Initial NTP time is not available on the first frame, but should still be |
| 1834 // able to be estimated. | 1828 // able to be estimated. |
| 1835 stream->InjectFrame(video_frame, 0); | 1829 stream->InjectFrame(video_frame, 0); |
| 1836 | 1830 |
| 1837 EXPECT_EQ(1, renderer.num_rendered_frames()); | 1831 EXPECT_EQ(1, renderer.num_rendered_frames()); |
| 1838 EXPECT_EQ(0, renderer.last_frame_elapsed_time_ns()); | 1832 EXPECT_EQ(0, renderer.last_frame_elapsed_time_ns()); |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3207 // Ensures that the correct settings are applied to the codec when two temporal | 3201 // Ensures that the correct settings are applied to the codec when two temporal |
| 3208 // layer screencasting is enabled, and that the correct simulcast settings are | 3202 // layer screencasting is enabled, and that the correct simulcast settings are |
| 3209 // reapplied when disabling screencasting. | 3203 // reapplied when disabling screencasting. |
| 3210 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3204 TEST_F(WebRtcVideoChannel2SimulcastTest, |
| 3211 DISABLED_TwoTemporalLayerScreencastSettings) { | 3205 DISABLED_TwoTemporalLayerScreencastSettings) { |
| 3212 // TODO(pbos): Implement. | 3206 // TODO(pbos): Implement. |
| 3213 FAIL() << "Not implemented."; | 3207 FAIL() << "Not implemented."; |
| 3214 } | 3208 } |
| 3215 | 3209 |
| 3216 } // namespace cricket | 3210 } // namespace cricket |
| OLD | NEW |