OLD | NEW |
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/video_capture_device_factory.h" | 5 #include "media/capture/video/video_capture_device_factory.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
8 #include "build/build_config.h" | 10 #include "build/build_config.h" |
9 #include "media/base/media_switches.h" | 11 #include "media/base/media_switches.h" |
10 #include "media/capture/video/fake_video_capture_device_factory.h" | 12 #include "media/capture/video/fake_video_capture_device_factory.h" |
11 #include "media/capture/video/file_video_capture_device_factory.h" | 13 #include "media/capture/video/file_video_capture_device_factory.h" |
12 | 14 |
13 namespace media { | 15 namespace media { |
14 | 16 |
15 // static | 17 // static |
16 scoped_ptr<VideoCaptureDeviceFactory> VideoCaptureDeviceFactory::CreateFactory( | 18 scoped_ptr<VideoCaptureDeviceFactory> VideoCaptureDeviceFactory::CreateFactory( |
(...skipping 25 matching lines...) Expand all Loading... |
42 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() { | 44 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() { |
43 } | 45 } |
44 | 46 |
45 void VideoCaptureDeviceFactory::EnumerateDeviceNames(const base::Callback< | 47 void VideoCaptureDeviceFactory::EnumerateDeviceNames(const base::Callback< |
46 void(scoped_ptr<media::VideoCaptureDevice::Names>)>& callback) { | 48 void(scoped_ptr<media::VideoCaptureDevice::Names>)>& callback) { |
47 DCHECK(thread_checker_.CalledOnValidThread()); | 49 DCHECK(thread_checker_.CalledOnValidThread()); |
48 DCHECK(!callback.is_null()); | 50 DCHECK(!callback.is_null()); |
49 scoped_ptr<VideoCaptureDevice::Names> device_names( | 51 scoped_ptr<VideoCaptureDevice::Names> device_names( |
50 new VideoCaptureDevice::Names()); | 52 new VideoCaptureDevice::Names()); |
51 GetDeviceNames(device_names.get()); | 53 GetDeviceNames(device_names.get()); |
52 callback.Run(device_names.Pass()); | 54 callback.Run(std::move(device_names)); |
53 } | 55 } |
54 | 56 |
55 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ | 57 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ |
56 !defined(OS_WIN) | 58 !defined(OS_WIN) |
57 // static | 59 // static |
58 VideoCaptureDeviceFactory* | 60 VideoCaptureDeviceFactory* |
59 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( | 61 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( |
60 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 62 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
61 NOTIMPLEMENTED(); | 63 NOTIMPLEMENTED(); |
62 return NULL; | 64 return NULL; |
63 } | 65 } |
64 #endif | 66 #endif |
65 | 67 |
66 } // namespace media | 68 } // namespace media |
OLD | NEW |