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