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 24 matching lines...) Expand all Loading... |
35 // screen rotations. | 35 // screen rotations. |
36 return std::unique_ptr<VideoCaptureDeviceFactory>( | 36 return std::unique_ptr<VideoCaptureDeviceFactory>( |
37 CreateVideoCaptureDeviceFactory(ui_task_runner)); | 37 CreateVideoCaptureDeviceFactory(ui_task_runner)); |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { | 41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { |
42 thread_checker_.DetachFromThread(); | 42 thread_checker_.DetachFromThread(); |
43 } | 43 } |
44 | 44 |
45 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() { | 45 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {} |
46 } | |
47 | 46 |
48 void VideoCaptureDeviceFactory::EnumerateDeviceNames( | 47 void VideoCaptureDeviceFactory::EnumerateDeviceDescriptors( |
49 const base::Callback< | 48 const base::Callback<void(std::unique_ptr<VideoCaptureDeviceDescriptors>)>& |
50 void(std::unique_ptr<media::VideoCaptureDevice::Names>)>& callback) { | 49 callback) { |
51 DCHECK(thread_checker_.CalledOnValidThread()); | 50 DCHECK(thread_checker_.CalledOnValidThread()); |
52 DCHECK(!callback.is_null()); | 51 DCHECK(!callback.is_null()); |
53 std::unique_ptr<VideoCaptureDevice::Names> device_names( | 52 std::unique_ptr<VideoCaptureDeviceDescriptors> device_descriptors( |
54 new VideoCaptureDevice::Names()); | 53 new VideoCaptureDeviceDescriptors()); |
55 GetDeviceNames(device_names.get()); | 54 GetDeviceDescriptors(device_descriptors.get()); |
56 callback.Run(std::move(device_names)); | 55 callback.Run(std::move(device_descriptors)); |
57 } | 56 } |
58 | 57 |
59 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ | 58 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ |
60 !defined(OS_WIN) | 59 !defined(OS_WIN) |
61 // static | 60 // static |
62 VideoCaptureDeviceFactory* | 61 VideoCaptureDeviceFactory* |
63 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( | 62 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( |
64 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 63 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
65 NOTIMPLEMENTED(); | 64 NOTIMPLEMENTED(); |
66 return NULL; | 65 return NULL; |
67 } | 66 } |
68 #endif | 67 #endif |
69 | 68 |
70 } // namespace media | 69 } // namespace media |
OLD | NEW |