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

Side by Side Diff: media/video/capture/video_capture_device_unittest.cc

Issue 25388002: Eliminates the use of VideoCaptureDevice1 in VideoCaptureDeviceLinux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 | « media/video/capture/linux/video_capture_device_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 resolution.height(), 263 resolution.height(),
264 30, 264 30,
265 PIXEL_FORMAT_I420, 265 PIXEL_FORMAT_I420,
266 0, 266 0,
267 false, 267 false,
268 ConstantResolutionVideoCaptureDevice); 268 ConstantResolutionVideoCaptureDevice);
269 269
270 // The device (if it is an async implementation) may or may not get as far 270 // The device (if it is an async implementation) may or may not get as far
271 // as the OnFrameInfo() step; we're intentionally not going to wait for it 271 // as the OnFrameInfo() step; we're intentionally not going to wait for it
272 // to get that far. 272 // to get that far.
273 ON_CALL(*client, OnFrameInfo(_)); 273 EXPECT_CALL(*client, OnFrameInfo(_)).Times(testing::AtMost(1));
274 device->AllocateAndStart(requested_format, 274 device->AllocateAndStart(requested_format,
275 client.PassAs<Client>()); 275 client.PassAs<Client>());
276 device->StopAndDeAllocate(); 276 device->StopAndDeAllocate();
277 } 277 }
278 278
279 // Finally, do a device start and wait for it to finish. 279 // Finally, do a device start and wait for it to finish.
280 gfx::Size resolution; 280 gfx::Size resolution;
281 VideoCaptureCapability requested_format( 281 VideoCaptureCapability requested_format(
282 320, 282 320,
283 240, 283 240,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 // FakeDevice is supposed to change and what is its actual frame rate. 441 // FakeDevice is supposed to change and what is its actual frame rate.
442 // We set TimeWait to 200 action timeouts and this should be enough for at 442 // We set TimeWait to 200 action timeouts and this should be enough for at
443 // least action_count/kFakeCaptureCapabilityChangePeriod calls. 443 // least action_count/kFakeCaptureCapabilityChangePeriod calls.
444 for (int i = 0; i < action_count; ++i) { 444 for (int i = 0; i < action_count; ++i) {
445 WaitForCapturedFrame(); 445 WaitForCapturedFrame();
446 } 446 }
447 device->StopAndDeAllocate(); 447 device->StopAndDeAllocate();
448 } 448 }
449 449
450 }; // namespace media 450 }; // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/linux/video_capture_device_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698