| 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_GDI_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ |
| 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "webrtc/modules/desktop_capture/screen_capturer.h" | 16 #include "webrtc/modules/desktop_capture/screen_capturer.h" |
| 17 | 17 |
| 18 #include <windows.h> | 18 #include <windows.h> |
| 19 | 19 |
| 20 #include "webrtc/base/scoped_ptr.h" | 20 #include "webrtc/base/scoped_ptr.h" |
| 21 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" | 21 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" |
| 22 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" | 22 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" |
| 23 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" |
| 23 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" | 24 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" |
| 24 | 25 |
| 25 namespace webrtc { | 26 namespace webrtc { |
| 26 | 27 |
| 27 class Differ; | 28 class Differ; |
| 28 | 29 |
| 29 // ScreenCapturerWinGdi captures 32bit RGB using GDI. | 30 // ScreenCapturerWinGdi captures 32bit RGB using GDI. |
| 30 // | 31 // |
| 31 // ScreenCapturerWinGdi is double-buffered as required by ScreenCapturer. | 32 // ScreenCapturerWinGdi is double-buffered as required by ScreenCapturer. |
| 32 class ScreenCapturerWinGdi : public ScreenCapturer { | 33 class ScreenCapturerWinGdi : public ScreenCapturer { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // recently captured screen. | 65 // recently captured screen. |
| 65 ScreenCapturerHelper helper_; | 66 ScreenCapturerHelper helper_; |
| 66 | 67 |
| 67 ScopedThreadDesktop desktop_; | 68 ScopedThreadDesktop desktop_; |
| 68 | 69 |
| 69 // GDI resources used for screen capture. | 70 // GDI resources used for screen capture. |
| 70 HDC desktop_dc_; | 71 HDC desktop_dc_; |
| 71 HDC memory_dc_; | 72 HDC memory_dc_; |
| 72 | 73 |
| 73 // Queue of the frames buffers. | 74 // Queue of the frames buffers. |
| 74 ScreenCaptureFrameQueue queue_; | 75 ScreenCaptureFrameQueue<SharedDesktopFrame> queue_; |
| 75 | 76 |
| 76 // Rectangle describing the bounds of the desktop device context, relative to | 77 // Rectangle describing the bounds of the desktop device context, relative to |
| 77 // the primary display's top-left. | 78 // the primary display's top-left. |
| 78 DesktopRect desktop_dc_rect_; | 79 DesktopRect desktop_dc_rect_; |
| 79 | 80 |
| 80 // Class to calculate the difference between two screen bitmaps. | 81 // Class to calculate the difference between two screen bitmaps. |
| 81 std::unique_ptr<Differ> differ_; | 82 std::unique_ptr<Differ> differ_; |
| 82 | 83 |
| 83 HMODULE dwmapi_library_; | 84 HMODULE dwmapi_library_; |
| 84 DwmEnableCompositionFunc composition_func_; | 85 DwmEnableCompositionFunc composition_func_; |
| 85 | 86 |
| 86 // Used to suppress duplicate logging of SetThreadExecutionState errors. | 87 // Used to suppress duplicate logging of SetThreadExecutionState errors. |
| 87 bool set_thread_execution_state_failed_; | 88 bool set_thread_execution_state_failed_; |
| 88 | 89 |
| 89 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinGdi); | 90 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinGdi); |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 } // namespace webrtc | 93 } // namespace webrtc |
| 93 | 94 |
| 94 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ | 95 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ |
| OLD | NEW |