| 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 const std::string& device_name, |
| 51 VideoCaptureFormats* capture_formats) OVERRIDE; |
| 49 | 52 |
| 50 static void GetDeviceNames(Names* device_names); | 53 static void GetDeviceNames(Names* device_names); |
| 51 | 54 |
| 52 private: | 55 private: |
| 53 enum InternalState { | 56 enum InternalState { |
| 54 kIdle, // The device driver is opened but camera is not in use. | 57 kIdle, // The device driver is opened but camera is not in use. |
| 55 kAllocated, // The camera has been allocated and can be started. | 58 kAllocated, // The camera has been allocated and can be started. |
| 56 kCapturing, // Video is being captured. | 59 kCapturing, // Video is being captured. |
| 57 kError // Error accessing HW functions. | 60 kError // Error accessing HW functions. |
| 58 // User needs to recover by destroying the object. | 61 // User needs to recover by destroying the object. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 82 | 85 |
| 83 // Map of all capabilities this device support. | 86 // Map of all capabilities this device support. |
| 84 CapabilityList capabilities_; | 87 CapabilityList capabilities_; |
| 85 | 88 |
| 86 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 89 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 } // namespace media | 92 } // namespace media |
| 90 | 93 |
| 91 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 94 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| OLD | NEW |