OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Windows specific implementation of VideoCaptureDevice. | 5 // Windows specific implementation of VideoCaptureDevice. |
6 // DirectShow is used for capturing. DirectShow provide its own threads | 6 // DirectShow is used for capturing. DirectShow provide its own threads |
7 // for capturing. | 7 // for capturing. |
8 | 8 |
9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
(...skipping 28 matching lines...) Expand all Loading... |
39 // This function is used by the static VideoCaptureDevice::Create function. | 39 // This function is used by the static VideoCaptureDevice::Create function. |
40 bool Init(); | 40 bool Init(); |
41 | 41 |
42 // VideoCaptureDevice implementation. | 42 // VideoCaptureDevice implementation. |
43 virtual void Allocate(const VideoCaptureCapability& capture_format, | 43 virtual void Allocate(const VideoCaptureCapability& capture_format, |
44 VideoCaptureDevice::EventHandler* observer) OVERRIDE; | 44 VideoCaptureDevice::EventHandler* observer) OVERRIDE; |
45 virtual void Start() OVERRIDE; | 45 virtual void Start() OVERRIDE; |
46 virtual void Stop() OVERRIDE; | 46 virtual void Stop() OVERRIDE; |
47 virtual void DeAllocate() OVERRIDE; | 47 virtual void DeAllocate() OVERRIDE; |
48 virtual const Name& device_name() OVERRIDE; | 48 virtual const Name& device_name() OVERRIDE; |
| 49 virtual void GetDeviceSupportedFormats( |
| 50 VideoCaptureFormats* capture_formats) OVERRIDE; |
49 | 51 |
50 static void GetDeviceNames(Names* device_names); | 52 static void GetDeviceNames(Names* device_names); |
51 | 53 |
52 private: | 54 private: |
53 enum InternalState { | 55 enum InternalState { |
54 kIdle, // The device driver is opened but camera is not in use. | 56 kIdle, // The device driver is opened but camera is not in use. |
55 kAllocated, // The camera has been allocated and can be started. | 57 kAllocated, // The camera has been allocated and can be started. |
56 kCapturing, // Video is being captured. | 58 kCapturing, // Video is being captured. |
57 kError // Error accessing HW functions. | 59 kError // Error accessing HW functions. |
58 // User needs to recover by destroying the object. | 60 // User needs to recover by destroying the object. |
(...skipping 23 matching lines...) Expand all Loading... |
82 | 84 |
83 // Map of all capabilities this device support. | 85 // Map of all capabilities this device support. |
84 CapabilityList capabilities_; | 86 CapabilityList capabilities_; |
85 | 87 |
86 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 88 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
87 }; | 89 }; |
88 | 90 |
89 } // namespace media | 91 } // namespace media |
90 | 92 |
91 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 93 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
OLD | NEW |