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. DirectShow is used for | 5 // Windows specific implementation of VideoCaptureDevice. DirectShow is used for |
6 // capturing. DirectShow provide its own threads for capturing. | 6 // capturing. DirectShow provide its own threads for capturing. |
7 | 7 |
8 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 8 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
9 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 9 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 private: | 75 private: |
76 enum InternalState { | 76 enum InternalState { |
77 kIdle, // The device driver is opened but camera is not in use. | 77 kIdle, // The device driver is opened but camera is not in use. |
78 kCapturing, // Video is being captured. | 78 kCapturing, // Video is being captured. |
79 kError // Error accessing HW functions. | 79 kError // Error accessing HW functions. |
80 // User needs to recover by destroying the object. | 80 // User needs to recover by destroying the object. |
81 }; | 81 }; |
82 | 82 |
83 // Implements SinkFilterObserver. | 83 // Implements SinkFilterObserver. |
84 void FrameReceived(const uint8* buffer, int length, | 84 void FrameReceived(const uint8_t* buffer, |
| 85 int length, |
85 base::TimeTicks timestamp) override; | 86 base::TimeTicks timestamp) override; |
86 | 87 |
87 bool CreateCapabilityMap(); | 88 bool CreateCapabilityMap(); |
88 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); | 89 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); |
89 void SetErrorState(const tracked_objects::Location& from_here, | 90 void SetErrorState(const tracked_objects::Location& from_here, |
90 const std::string& reason); | 91 const std::string& reason); |
91 | 92 |
92 const Name device_name_; | 93 const Name device_name_; |
93 InternalState state_; | 94 InternalState state_; |
94 scoped_ptr<VideoCaptureDevice::Client> client_; | 95 scoped_ptr<VideoCaptureDevice::Client> client_; |
(...skipping 14 matching lines...) Expand all Loading... |
109 VideoCaptureFormat capture_format_; | 110 VideoCaptureFormat capture_format_; |
110 | 111 |
111 base::ThreadChecker thread_checker_; | 112 base::ThreadChecker thread_checker_; |
112 | 113 |
113 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 114 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
114 }; | 115 }; |
115 | 116 |
116 } // namespace media | 117 } // namespace media |
117 | 118 |
118 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 119 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
OLD | NEW |