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_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ |
6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | 6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/threading/thread_checker.h" | 8 #include "base/threading/thread_checker.h" |
9 #include "media/video/capture/video_capture_device.h" | 9 #include "media/video/capture/video_capture_device.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 void(scoped_ptr<media::VideoCaptureDevice::Names>)>& callback); | 31 void(scoped_ptr<media::VideoCaptureDevice::Names>)>& callback); |
32 | 32 |
33 // Gets the supported formats of a particular device attached to the system. | 33 // Gets the supported formats of a particular device attached to the system. |
34 // This method should be called before allocating or starting a device. In | 34 // This method should be called before allocating or starting a device. In |
35 // case format enumeration is not supported, or there was a problem, the | 35 // case format enumeration is not supported, or there was a problem, the |
36 // formats array will be empty. | 36 // formats array will be empty. |
37 virtual void GetDeviceSupportedFormats( | 37 virtual void GetDeviceSupportedFormats( |
38 const VideoCaptureDevice::Name& device, | 38 const VideoCaptureDevice::Name& device, |
39 VideoCaptureFormats* supported_formats) = 0; | 39 VideoCaptureFormats* supported_formats) = 0; |
40 | 40 |
| 41 // Gets the supported formats for still image of a particular device attached |
| 42 // to the system. In case format enumeration is not supported, or there was |
| 43 // a problem, the formats array will be empty. |
| 44 virtual void GetDeviceSupportedImageFormats( |
| 45 const VideoCaptureDevice::Name& device, |
| 46 ImageCaptureFormats* supported_formats) {} |
| 47 |
41 protected: | 48 protected: |
42 // Gets the names of all video capture devices connected to this computer. | 49 // Gets the names of all video capture devices connected to this computer. |
43 // Used by the default implementation of EnumerateDeviceNames(). | 50 // Used by the default implementation of EnumerateDeviceNames(). |
44 virtual void GetDeviceNames(VideoCaptureDevice::Names* device_names) = 0; | 51 virtual void GetDeviceNames(VideoCaptureDevice::Names* device_names) = 0; |
45 | 52 |
46 base::ThreadChecker thread_checker_; | 53 base::ThreadChecker thread_checker_; |
47 | 54 |
48 private: | 55 private: |
49 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory); | 56 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory); |
50 }; | 57 }; |
51 | 58 |
52 } // namespace media | 59 } // namespace media |
53 | 60 |
54 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | 61 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ |
OLD | NEW |