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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 }; | 86 }; |
87 | 87 |
88 // Implements SinkFilterObserver. | 88 // Implements SinkFilterObserver. |
89 void FrameReceived(const uint8_t* buffer, | 89 void FrameReceived(const uint8_t* buffer, |
90 int length, | 90 int length, |
91 base::TimeDelta timestamp) override; | 91 base::TimeDelta timestamp) override; |
92 | 92 |
93 bool CreateCapabilityMap(); | 93 bool CreateCapabilityMap(); |
94 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); | 94 void SetAntiFlickerInCaptureFilter(const VideoCaptureParams& params); |
95 void SetErrorState(const tracked_objects::Location& from_here, | 95 void SetErrorState(const tracked_objects::Location& from_here, |
96 const std::string& reason); | 96 const std::string& reason, |
| 97 HRESULT hr); |
97 | 98 |
98 const VideoCaptureDeviceDescriptor device_descriptor_; | 99 const VideoCaptureDeviceDescriptor device_descriptor_; |
99 InternalState state_; | 100 InternalState state_; |
100 std::unique_ptr<VideoCaptureDevice::Client> client_; | 101 std::unique_ptr<VideoCaptureDevice::Client> client_; |
101 | 102 |
102 base::win::ScopedComPtr<IBaseFilter> capture_filter_; | 103 base::win::ScopedComPtr<IBaseFilter> capture_filter_; |
103 | 104 |
104 base::win::ScopedComPtr<IGraphBuilder> graph_builder_; | 105 base::win::ScopedComPtr<IGraphBuilder> graph_builder_; |
105 base::win::ScopedComPtr<ICaptureGraphBuilder2> capture_graph_builder_; | 106 base::win::ScopedComPtr<ICaptureGraphBuilder2> capture_graph_builder_; |
106 | 107 |
(...skipping 12 matching lines...) Expand all Loading... |
119 std::queue<TakePhotoCallback> take_photo_callbacks_; | 120 std::queue<TakePhotoCallback> take_photo_callbacks_; |
120 | 121 |
121 base::ThreadChecker thread_checker_; | 122 base::ThreadChecker thread_checker_; |
122 | 123 |
123 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 124 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
124 }; | 125 }; |
125 | 126 |
126 } // namespace media | 127 } // namespace media |
127 | 128 |
128 #endif // MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 129 #endif // MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
OLD | NEW |