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 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ |
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
10 #include "media/capture/video/video_capture_device.h" | 10 #include "media/capture/video/video_capture_device.h" |
11 | 11 |
12 namespace media { | 12 namespace media { |
13 | 13 |
14 // VideoCaptureDeviceFactory is the base class for creation of video capture | 14 // VideoCaptureDeviceFactory is the base class for creation of video capture |
15 // devices in the different platforms. VCDFs are created by MediaStreamManager | 15 // devices in the different platforms. VCDFs are created by MediaStreamManager |
16 // on IO thread and plugged into VideoCaptureManager, who owns and operates them | 16 // on UI thread and plugged into VideoCaptureManager, who owns and operates them |
17 // in Device Thread (a.k.a. Audio Thread). | 17 // in Device Thread (a.k.a. Audio Thread). |
18 // Typical operation is to first call GetDeviceDescriptors() to obtain | 18 // Typical operation is to first call GetDeviceDescriptors() to obtain |
19 // information about available devices. The obtained descriptors can then be | 19 // information about available devices. The obtained descriptors can then be |
20 // used to either obtain the supported formats of a device using | 20 // used to either obtain the supported formats of a device using |
21 // GetSupportedFormats(), or to create an instance of VideoCaptureDevice for | 21 // GetSupportedFormats(), or to create an instance of VideoCaptureDevice for |
22 // the device using CreateDevice(). | 22 // the device using CreateDevice(). |
23 // TODO(chfremer): Add a layer on top of the platform-specific implementations | 23 // TODO(chfremer): Add a layer on top of the platform-specific implementations |
24 // that uses strings instead of descriptors as keys for accessing devices. | 24 // that uses strings instead of descriptors as keys for accessing devices. |
25 // crbug.com/665065 | 25 // crbug.com/665065 |
26 class CAPTURE_EXPORT VideoCaptureDeviceFactory { | 26 class CAPTURE_EXPORT VideoCaptureDeviceFactory { |
(...skipping 29 matching lines...) Expand all Loading... |
56 private: | 56 private: |
57 static VideoCaptureDeviceFactory* CreateVideoCaptureDeviceFactory( | 57 static VideoCaptureDeviceFactory* CreateVideoCaptureDeviceFactory( |
58 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); | 58 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory); | 60 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace media | 63 } // namespace media |
64 | 64 |
65 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | 65 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ |
OLD | NEW |