| 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_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 8 #ifndef MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| 9 #define MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 9 #define MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 SetPhotoOptionsCallback callback) override; | 82 SetPhotoOptionsCallback callback) override; |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 enum InternalState { | 85 enum InternalState { |
| 86 kIdle, // The device driver is opened but camera is not in use. | 86 kIdle, // The device driver is opened but camera is not in use. |
| 87 kCapturing, // Video is being captured. | 87 kCapturing, // Video is being captured. |
| 88 kError // Error accessing HW functions. | 88 kError // Error accessing HW functions. |
| 89 // User needs to recover by destroying the object. | 89 // User needs to recover by destroying the object. |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 void InitializeVideoAndCameraControls(); | |
| 93 | |
| 94 // Implements SinkFilterObserver. | 92 // Implements SinkFilterObserver. |
| 95 void FrameReceived(const uint8_t* buffer, | 93 void FrameReceived(const uint8_t* buffer, |
| 96 int length, | 94 int length, |
| 97 const VideoCaptureFormat& format, | 95 const VideoCaptureFormat& format, |
| 98 base::TimeDelta timestamp) override; | 96 base::TimeDelta timestamp) override; |
| 99 | 97 |
| 100 bool CreateCapabilityMap(); | 98 bool CreateCapabilityMap(); |
| 101 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); | 99 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); |
| 102 void SetErrorState(const tracked_objects::Location& from_here, | 100 void SetErrorState(const tracked_objects::Location& from_here, |
| 103 const std::string& reason, | 101 const std::string& reason, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 134 std::queue<TakePhotoCallback> take_photo_callbacks_; | 132 std::queue<TakePhotoCallback> take_photo_callbacks_; |
| 135 | 133 |
| 136 base::ThreadChecker thread_checker_; | 134 base::ThreadChecker thread_checker_; |
| 137 | 135 |
| 138 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 136 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
| 139 }; | 137 }; |
| 140 | 138 |
| 141 } // namespace media | 139 } // namespace media |
| 142 | 140 |
| 143 #endif // MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 141 #endif // MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| OLD | NEW |