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> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 CreateVideoCaptureDeviceFactory(ui_task_runner)); | 43 CreateVideoCaptureDeviceFactory(ui_task_runner)); |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { | 47 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { |
48 thread_checker_.DetachFromThread(); | 48 thread_checker_.DetachFromThread(); |
49 } | 49 } |
50 | 50 |
51 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {} | 51 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {} |
52 | 52 |
53 void VideoCaptureDeviceFactory::EnumerateDeviceDescriptors( | |
54 const base::Callback<void(std::unique_ptr<VideoCaptureDeviceDescriptors>)>& | |
55 callback) { | |
56 DCHECK(thread_checker_.CalledOnValidThread()); | |
57 DCHECK(!callback.is_null()); | |
58 std::unique_ptr<VideoCaptureDeviceDescriptors> device_descriptors( | |
59 new VideoCaptureDeviceDescriptors()); | |
60 GetDeviceDescriptors(device_descriptors.get()); | |
61 callback.Run(std::move(device_descriptors)); | |
62 } | |
63 | |
64 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ | 53 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ |
65 !defined(OS_WIN) | 54 !defined(OS_WIN) |
66 // static | 55 // static |
67 VideoCaptureDeviceFactory* | 56 VideoCaptureDeviceFactory* |
68 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( | 57 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( |
69 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 58 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
70 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
71 return NULL; | 60 return NULL; |
72 } | 61 } |
73 #endif | 62 #endif |
74 | 63 |
75 } // namespace media | 64 } // namespace media |
OLD | NEW |