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

Side by Side Diff: talk/app/webrtc/videosource_unittest.cc

Issue 1574963002: Deleted renderer-related SetSize methods, and all uses. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 11 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
« no previous file with comments | « talk/app/webrtc/test/fakevideotrackrenderer.h ('k') | talk/media/base/capturerenderadapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 state_observer_.reset(new StateObserver(source_)); 218 state_observer_.reset(new StateObserver(source_));
219 source_->RegisterObserver(state_observer_.get()); 219 source_->RegisterObserver(state_observer_.get());
220 source_->AddSink(&renderer_); 220 source_->AddSink(&renderer_);
221 221
222 EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(), 222 EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
223 kMaxWaitMs); 223 kMaxWaitMs);
224 224
225 cricket::VideoRenderer* frameinput = source_->FrameInput(); 225 cricket::VideoRenderer* frameinput = source_->FrameInput();
226 cricket::WebRtcVideoFrame test_frame; 226 cricket::WebRtcVideoFrame test_frame;
227 frameinput->SetSize(1280, 720, 0);
228 frameinput->RenderFrame(&test_frame); 227 frameinput->RenderFrame(&test_frame);
229 EXPECT_EQ(1, renderer_.num_rendered_frames()); 228 EXPECT_EQ(1, renderer_.num_rendered_frames());
230 229
231 source_->GetVideoCapturer()->Stop(); 230 source_->GetVideoCapturer()->Stop();
232 EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(), 231 EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(),
233 kMaxWaitMs); 232 kMaxWaitMs);
234 } 233 }
235 234
236 // Test that a VideoSource transition to kEnded if the capture device 235 // Test that a VideoSource transition to kEnded if the capture device
237 // fails. 236 // fails.
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 FakeConstraints constraints; 542 FakeConstraints constraints;
544 constraints.AddOptional(MediaConstraintsInterface::kMaxFrameRate, 0.5); 543 constraints.AddOptional(MediaConstraintsInterface::kMaxFrameRate, 0.5);
545 544
546 CreateVideoSource(&constraints); 545 CreateVideoSource(&constraints);
547 EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(), 546 EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
548 kMaxWaitMs); 547 kMaxWaitMs);
549 const cricket::VideoFormat* format = capturer_->GetCaptureFormat(); 548 const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
550 ASSERT_TRUE(format != NULL); 549 ASSERT_TRUE(format != NULL);
551 EXPECT_EQ(30, format->framerate()); 550 EXPECT_EQ(30, format->framerate());
552 } 551 }
553
OLDNEW
« no previous file with comments | « talk/app/webrtc/test/fakevideotrackrenderer.h ('k') | talk/media/base/capturerenderadapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698