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 AllocateAndStart(const VideoCaptureParams& params, | 43 virtual void AllocateAndStart(const VideoCaptureParams& params, |
44 scoped_ptr<VideoCaptureDevice::Client> client) | 44 scoped_ptr<VideoCaptureDevice::Client> client) |
45 OVERRIDE; | 45 OVERRIDE; |
46 virtual void StopAndDeAllocate() OVERRIDE; | 46 virtual void StopAndDeAllocate() OVERRIDE; |
47 | 47 |
48 static void GetDeviceNames(Names* device_names); | 48 static void GetDeviceNames(Names* device_names); |
| 49 static void GetDeviceSupportedFormats(const Name& device, |
| 50 VideoCaptureFormats* formats); |
49 | 51 |
50 private: | 52 private: |
51 enum InternalState { | 53 enum InternalState { |
52 kIdle, // The device driver is opened but camera is not in use. | 54 kIdle, // The device driver is opened but camera is not in use. |
53 kCapturing, // Video is being captured. | 55 kCapturing, // Video is being captured. |
54 kError // Error accessing HW functions. | 56 kError // Error accessing HW functions. |
55 // User needs to recover by destroying the object. | 57 // User needs to recover by destroying the object. |
56 }; | 58 }; |
57 | 59 |
58 // Implements SinkFilterObserver. | 60 // Implements SinkFilterObserver. |
(...skipping 21 matching lines...) Expand all Loading... |
80 // Map of all capabilities this device support. | 82 // Map of all capabilities this device support. |
81 CapabilityList capabilities_; | 83 CapabilityList capabilities_; |
82 VideoCaptureFormat capture_format_; | 84 VideoCaptureFormat capture_format_; |
83 | 85 |
84 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 86 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
85 }; | 87 }; |
86 | 88 |
87 } // namespace media | 89 } // namespace media |
88 | 90 |
89 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 91 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
OLD | NEW |