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

Side by Side Diff: media/capture/video/win/video_capture_device_factory_win.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 | « device/hid/hid_service_win.cc ('k') | media/capture/video/win/video_capture_device_mf_win.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/capture/video/win/video_capture_device_factory_win.h" 5 #include "media/capture/video/win/video_capture_device_factory_win.h"
6 6
7 #include <mfapi.h> 7 #include <mfapi.h>
8 #include <mferror.h> 8 #include <mferror.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 396 }
397 if (!static_cast<VideoCaptureDeviceMFWin*>(device.get())->Init(source)) 397 if (!static_cast<VideoCaptureDeviceMFWin*>(device.get())->Init(source))
398 device.reset(); 398 device.reset();
399 } else { 399 } else {
400 DCHECK(device_name.capture_api_type() == Name::DIRECT_SHOW); 400 DCHECK(device_name.capture_api_type() == Name::DIRECT_SHOW);
401 device.reset(new VideoCaptureDeviceWin(device_name)); 401 device.reset(new VideoCaptureDeviceWin(device_name));
402 DVLOG(1) << " DirectShow Device: " << device_name.name(); 402 DVLOG(1) << " DirectShow Device: " << device_name.name();
403 if (!static_cast<VideoCaptureDeviceWin*>(device.get())->Init()) 403 if (!static_cast<VideoCaptureDeviceWin*>(device.get())->Init())
404 device.reset(); 404 device.reset();
405 } 405 }
406 return device.Pass(); 406 return device;
407 } 407 }
408 408
409 void VideoCaptureDeviceFactoryWin::GetDeviceNames(Names* device_names) { 409 void VideoCaptureDeviceFactoryWin::GetDeviceNames(Names* device_names) {
410 DCHECK(thread_checker_.CalledOnValidThread()); 410 DCHECK(thread_checker_.CalledOnValidThread());
411 if (use_media_foundation_) 411 if (use_media_foundation_)
412 GetDeviceNamesMediaFoundation(device_names); 412 GetDeviceNamesMediaFoundation(device_names);
413 else 413 else
414 GetDeviceNamesDirectShow(device_names); 414 GetDeviceNamesDirectShow(device_names);
415 } 415 }
416 416
417 void VideoCaptureDeviceFactoryWin::GetDeviceSupportedFormats( 417 void VideoCaptureDeviceFactoryWin::GetDeviceSupportedFormats(
418 const Name& device, 418 const Name& device,
419 VideoCaptureFormats* formats) { 419 VideoCaptureFormats* formats) {
420 DCHECK(thread_checker_.CalledOnValidThread()); 420 DCHECK(thread_checker_.CalledOnValidThread());
421 if (use_media_foundation_) 421 if (use_media_foundation_)
422 GetDeviceSupportedFormatsMediaFoundation(device, formats); 422 GetDeviceSupportedFormatsMediaFoundation(device, formats);
423 else 423 else
424 GetDeviceSupportedFormatsDirectShow(device, formats); 424 GetDeviceSupportedFormatsDirectShow(device, formats);
425 } 425 }
426 426
427 // static 427 // static
428 VideoCaptureDeviceFactory* 428 VideoCaptureDeviceFactory*
429 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 429 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
430 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 430 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
431 return new VideoCaptureDeviceFactoryWin(); 431 return new VideoCaptureDeviceFactoryWin();
432 } 432 }
433 433
434 } // namespace media 434 } // namespace media
OLDNEW
« no previous file with comments | « device/hid/hid_service_win.cc ('k') | media/capture/video/win/video_capture_device_mf_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698