| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 enum InternalState { | 72 enum InternalState { |
| 73 kIdle, // The device driver is opened but camera is not in use. | 73 kIdle, // The device driver is opened but camera is not in use. |
| 74 kCapturing, // Video is being captured. | 74 kCapturing, // Video is being captured. |
| 75 kError // Error accessing HW functions. | 75 kError // Error accessing HW functions. |
| 76 // User needs to recover by destroying the object. | 76 // User needs to recover by destroying the object. |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 // Implements SinkFilterObserver. | 79 // Implements SinkFilterObserver. |
| 80 void FrameReceived(const uint8* buffer, int length) override; | 80 void FrameReceived( |
| 81 const uint8* buffer, |
| 82 int length, |
| 83 REFERENCE_TIME raw_timestamp) override; |
| 81 | 84 |
| 82 bool CreateCapabilityMap(); | 85 bool CreateCapabilityMap(); |
| 83 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); | 86 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); |
| 84 void SetErrorState(const std::string& reason); | 87 void SetErrorState(const std::string& reason); |
| 85 | 88 |
| 86 const Name device_name_; | 89 const Name device_name_; |
| 87 InternalState state_; | 90 InternalState state_; |
| 88 scoped_ptr<VideoCaptureDevice::Client> client_; | 91 scoped_ptr<VideoCaptureDevice::Client> client_; |
| 89 | 92 |
| 90 base::win::ScopedComPtr<IBaseFilter> capture_filter_; | 93 base::win::ScopedComPtr<IBaseFilter> capture_filter_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 103 VideoCaptureFormat capture_format_; | 106 VideoCaptureFormat capture_format_; |
| 104 | 107 |
| 105 base::ThreadChecker thread_checker_; | 108 base::ThreadChecker thread_checker_; |
| 106 | 109 |
| 107 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 110 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
| 108 }; | 111 }; |
| 109 | 112 |
| 110 } // namespace media | 113 } // namespace media |
| 111 | 114 |
| 112 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 115 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| OLD | NEW |