OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ |
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include <windows.h> | 16 #include <windows.h> |
17 #include <magnification.h> | 17 #include <magnification.h> |
18 #include <wincodec.h> | 18 #include <wincodec.h> |
19 | 19 |
20 #include "webrtc/base/constructormagic.h" | 20 #include "webrtc/base/constructormagic.h" |
21 #include "webrtc/base/scoped_ptr.h" | 21 #include "webrtc/base/scoped_ptr.h" |
22 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" | 22 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" |
23 #include "webrtc/modules/desktop_capture/screen_capturer.h" | 23 #include "webrtc/modules/desktop_capture/screen_capturer.h" |
24 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" | 24 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" |
25 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | |
26 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" | 25 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" |
27 #include "webrtc/system_wrappers/include/atomic32.h" | 26 #include "webrtc/system_wrappers/include/atomic32.h" |
28 | 27 |
29 namespace webrtc { | 28 namespace webrtc { |
30 | 29 |
31 class DesktopFrame; | 30 class DesktopFrame; |
32 class DesktopRect; | 31 class DesktopRect; |
33 class Differ; | 32 class Differ; |
34 | 33 |
35 // Captures the screen using the Magnification API to support window exclusion. | 34 // Captures the screen using the Magnification API to support window exclusion. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 std::unique_ptr<SharedMemoryFactory> shared_memory_factory_; | 111 std::unique_ptr<SharedMemoryFactory> shared_memory_factory_; |
113 ScreenId current_screen_id_; | 112 ScreenId current_screen_id_; |
114 std::wstring current_device_key_; | 113 std::wstring current_device_key_; |
115 HWND excluded_window_; | 114 HWND excluded_window_; |
116 | 115 |
117 // A thread-safe list of invalid rectangles, and the size of the most | 116 // A thread-safe list of invalid rectangles, and the size of the most |
118 // recently captured screen. | 117 // recently captured screen. |
119 ScreenCapturerHelper helper_; | 118 ScreenCapturerHelper helper_; |
120 | 119 |
121 // Queue of the frames buffers. | 120 // Queue of the frames buffers. |
122 ScreenCaptureFrameQueue<SharedDesktopFrame> queue_; | 121 ScreenCaptureFrameQueue queue_; |
123 | 122 |
124 // Class to calculate the difference between two screen bitmaps. | 123 // Class to calculate the difference between two screen bitmaps. |
125 std::unique_ptr<Differ> differ_; | 124 std::unique_ptr<Differ> differ_; |
126 | 125 |
127 // Used to suppress duplicate logging of SetThreadExecutionState errors. | 126 // Used to suppress duplicate logging of SetThreadExecutionState errors. |
128 bool set_thread_execution_state_failed_; | 127 bool set_thread_execution_state_failed_; |
129 | 128 |
130 ScopedThreadDesktop desktop_; | 129 ScopedThreadDesktop desktop_; |
131 | 130 |
132 // Used for getting the screen dpi. | 131 // Used for getting the screen dpi. |
(...skipping 17 matching lines...) Expand all Loading... |
150 // True if the last OnMagImageScalingCallback was called and handled | 149 // True if the last OnMagImageScalingCallback was called and handled |
151 // successfully. Reset at the beginning of each CaptureImage call. | 150 // successfully. Reset at the beginning of each CaptureImage call. |
152 bool magnifier_capture_succeeded_; | 151 bool magnifier_capture_succeeded_; |
153 | 152 |
154 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier); | 153 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier); |
155 }; | 154 }; |
156 | 155 |
157 } // namespace webrtc | 156 } // namespace webrtc |
158 | 157 |
159 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ | 158 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ |
OLD | NEW |