Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2_unittest.cc

Issue 1334793003: Remove VideoMediaChannel::SetRender(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove fake SetRender Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 cricket::VideoFormat capture_format_hd = (*formats)[0]; 841 cricket::VideoFormat capture_format_hd = (*formats)[0];
842 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format_hd)); 842 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format_hd));
843 EXPECT_TRUE(channel_->SetCapturer(kSsrc, video_capturer_.get())); 843 EXPECT_TRUE(channel_->SetCapturer(kSsrc, video_capturer_.get()));
844 844
845 // Capture format HD -> adapt (OnOutputFormatRequest VGA) -> VGA. 845 // Capture format HD -> adapt (OnOutputFormatRequest VGA) -> VGA.
846 cricket::VideoCodec codec = kVp8Codec720p; 846 cricket::VideoCodec codec = kVp8Codec720p;
847 EXPECT_TRUE(SetOneCodec(codec)); 847 EXPECT_TRUE(SetOneCodec(codec));
848 codec.width /= 2; 848 codec.width /= 2;
849 codec.height /= 2; 849 codec.height /= 2;
850 EXPECT_TRUE(SetSend(true)); 850 EXPECT_TRUE(SetSend(true));
851 EXPECT_TRUE(channel_->SetRender(true));
852 EXPECT_EQ(0, renderer_.num_rendered_frames()); 851 EXPECT_EQ(0, renderer_.num_rendered_frames());
853 EXPECT_TRUE(SendFrame()); 852 EXPECT_TRUE(SendFrame());
854 EXPECT_FRAME_WAIT(1, codec.width, codec.height, kTimeout); 853 EXPECT_FRAME_WAIT(1, codec.width, codec.height, kTimeout);
855 } 854 }
856 855
857 class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test, 856 class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test,
858 public WebRtcCallFactory { 857 public WebRtcCallFactory {
859 public: 858 public:
860 WebRtcVideoChannel2Test() : fake_call_(NULL), last_ssrc_(0) {} 859 WebRtcVideoChannel2Test() : fake_call_(NULL), last_ssrc_(0) {}
861 void SetUp() override { 860 void SetUp() override {
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 } 1414 }
1416 1415
1417 TEST_F(WebRtcVideoChannel2Test, DISABLED_HybridNackFecConference) { 1416 TEST_F(WebRtcVideoChannel2Test, DISABLED_HybridNackFecConference) {
1418 FAIL() << "Not implemented."; // TODO(pbos): Implement. 1417 FAIL() << "Not implemented."; // TODO(pbos): Implement.
1419 } 1418 }
1420 1419
1421 TEST_F(WebRtcVideoChannel2Test, DISABLED_AddRemoveRecvStreamConference) { 1420 TEST_F(WebRtcVideoChannel2Test, DISABLED_AddRemoveRecvStreamConference) {
1422 FAIL() << "Not implemented."; // TODO(pbos): Implement. 1421 FAIL() << "Not implemented."; // TODO(pbos): Implement.
1423 } 1422 }
1424 1423
1425 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetRender) {
1426 FAIL() << "Not implemented."; // TODO(pbos): Implement.
1427 }
1428
1429 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAuto) { 1424 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAuto) {
1430 FAIL() << "Not implemented."; // TODO(pbos): Implement. 1425 FAIL() << "Not implemented."; // TODO(pbos): Implement.
1431 } 1426 }
1432 1427
1433 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAutoCapped) { 1428 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthAutoCapped) {
1434 FAIL() << "Not implemented."; // TODO(pbos): Implement. 1429 FAIL() << "Not implemented."; // TODO(pbos): Implement.
1435 } 1430 }
1436 1431
1437 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthFixed) { 1432 TEST_F(WebRtcVideoChannel2Test, DISABLED_SetBandwidthFixed) {
1438 FAIL() << "Not implemented."; // TODO(pbos): Implement. 1433 FAIL() << "Not implemented."; // TODO(pbos): Implement.
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 TEST_F(WebRtcVideoChannel2Test, EstimatesNtpStartTimeAndElapsedTimeCorrectly) { 1784 TEST_F(WebRtcVideoChannel2Test, EstimatesNtpStartTimeAndElapsedTimeCorrectly) {
1790 // Start at last timestamp to verify that wraparounds are estimated correctly. 1785 // Start at last timestamp to verify that wraparounds are estimated correctly.
1791 static const uint32_t kInitialTimestamp = 0xFFFFFFFFu; 1786 static const uint32_t kInitialTimestamp = 0xFFFFFFFFu;
1792 static const int64_t kInitialNtpTimeMs = 1247891230; 1787 static const int64_t kInitialNtpTimeMs = 1247891230;
1793 static const int kFrameOffsetMs = 20; 1788 static const int kFrameOffsetMs = 20;
1794 EXPECT_TRUE(channel_->SetRecvCodecs(engine_.codecs())); 1789 EXPECT_TRUE(channel_->SetRecvCodecs(engine_.codecs()));
1795 1790
1796 FakeVideoReceiveStream* stream = AddRecvStream(); 1791 FakeVideoReceiveStream* stream = AddRecvStream();
1797 cricket::FakeVideoRenderer renderer; 1792 cricket::FakeVideoRenderer renderer;
1798 EXPECT_TRUE(channel_->SetRenderer(last_ssrc_, &renderer)); 1793 EXPECT_TRUE(channel_->SetRenderer(last_ssrc_, &renderer));
1799 EXPECT_TRUE(channel_->SetRender(true));
1800 1794
1801 webrtc::VideoFrame video_frame; 1795 webrtc::VideoFrame video_frame;
1802 CreateBlackFrame(&video_frame, 4, 4); 1796 CreateBlackFrame(&video_frame, 4, 4);
1803 video_frame.set_timestamp(kInitialTimestamp); 1797 video_frame.set_timestamp(kInitialTimestamp);
1804 // Initial NTP time is not available on the first frame, but should still be 1798 // Initial NTP time is not available on the first frame, but should still be
1805 // able to be estimated. 1799 // able to be estimated.
1806 stream->InjectFrame(video_frame, 0); 1800 stream->InjectFrame(video_frame, 0);
1807 1801
1808 EXPECT_EQ(1, renderer.num_rendered_frames()); 1802 EXPECT_EQ(1, renderer.num_rendered_frames());
1809 EXPECT_EQ(0, renderer.last_frame_elapsed_time_ns()); 1803 EXPECT_EQ(0, renderer.last_frame_elapsed_time_ns());
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
3190 // Ensures that the correct settings are applied to the codec when two temporal 3184 // Ensures that the correct settings are applied to the codec when two temporal
3191 // layer screencasting is enabled, and that the correct simulcast settings are 3185 // layer screencasting is enabled, and that the correct simulcast settings are
3192 // reapplied when disabling screencasting. 3186 // reapplied when disabling screencasting.
3193 TEST_F(WebRtcVideoChannel2SimulcastTest, 3187 TEST_F(WebRtcVideoChannel2SimulcastTest,
3194 DISABLED_TwoTemporalLayerScreencastSettings) { 3188 DISABLED_TwoTemporalLayerScreencastSettings) {
3195 // TODO(pbos): Implement. 3189 // TODO(pbos): Implement.
3196 FAIL() << "Not implemented."; 3190 FAIL() << "Not implemented.";
3197 } 3191 }
3198 3192
3199 } // namespace cricket 3193 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698