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 |
11 // Avoid including strsafe.h via dshow as it will cause build warnings. | 11 // Avoid including strsafe.h via dshow as it will cause build warnings. |
12 #define NO_DSHOW_STRSAFE | 12 #define NO_DSHOW_STRSAFE |
13 #include <dshow.h> | 13 #include <dshow.h> |
14 #include <stdint.h> | 14 #include <stdint.h> |
15 | 15 |
16 #include <map> | 16 #include <map> |
17 #include <string> | 17 #include <string> |
18 | 18 |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/threading/thread_checker.h" | 20 #include "base/threading/thread_checker.h" |
21 #include "base/win/scoped_comptr.h" | 21 #include "base/win/scoped_comptr.h" |
22 #include "media/base/video_capture_types.h" | |
23 #include "media/capture/video/video_capture_device.h" | 22 #include "media/capture/video/video_capture_device.h" |
24 #include "media/capture/video/win/capability_list_win.h" | 23 #include "media/capture/video/win/capability_list_win.h" |
25 #include "media/capture/video/win/sink_filter_win.h" | 24 #include "media/capture/video/win/sink_filter_win.h" |
26 #include "media/capture/video/win/sink_input_pin_win.h" | 25 #include "media/capture/video/win/sink_input_pin_win.h" |
| 26 #include "media/capture/video_capture_types.h" |
27 | 27 |
28 namespace tracked_objects { | 28 namespace tracked_objects { |
29 class Location; | 29 class Location; |
30 } // namespace tracked_objects | 30 } // namespace tracked_objects |
31 | 31 |
32 namespace media { | 32 namespace media { |
33 | 33 |
34 // All the methods in the class can only be run on a COM initialized thread. | 34 // All the methods in the class can only be run on a COM initialized thread. |
35 class VideoCaptureDeviceWin : public VideoCaptureDevice, | 35 class VideoCaptureDeviceWin : public VideoCaptureDevice, |
36 public SinkFilterObserver { | 36 public SinkFilterObserver { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 std::queue<TakePhotoCallback> take_photo_callbacks_; | 120 std::queue<TakePhotoCallback> take_photo_callbacks_; |
121 | 121 |
122 base::ThreadChecker thread_checker_; | 122 base::ThreadChecker thread_checker_; |
123 | 123 |
124 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 124 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
125 }; | 125 }; |
126 | 126 |
127 } // namespace media | 127 } // namespace media |
128 | 128 |
129 #endif // MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 129 #endif // MEDIA_CAPTURE_VIDEO_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
OLD | NEW |