OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h" | 11 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h" |
12 | 12 |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
16 #include "webrtc/base/logging.h" | 16 #include "webrtc/base/logging.h" |
17 #include "webrtc/base/timeutils.h" | 17 #include "webrtc/base/timeutils.h" |
18 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 18 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
| 19 #include "webrtc/modules/desktop_capture/screen_capturer_differ_wrapper.h" |
19 | 20 |
20 namespace webrtc { | 21 namespace webrtc { |
21 | 22 |
22 using Microsoft::WRL::ComPtr; | 23 using Microsoft::WRL::ComPtr; |
23 | 24 |
| 25 // static |
24 bool ScreenCapturerWinDirectx::IsSupported() { | 26 bool ScreenCapturerWinDirectx::IsSupported() { |
25 // Forward IsSupported function call to DxgiDuplicatorController. | 27 // Forward IsSupported function call to DxgiDuplicatorController. |
26 return DxgiDuplicatorController::Instance()->IsSupported(); | 28 return DxgiDuplicatorController::Instance()->IsSupported(); |
27 } | 29 } |
28 | 30 |
29 ScreenCapturerWinDirectx::ScreenCapturerWinDirectx( | 31 ScreenCapturerWinDirectx::ScreenCapturerWinDirectx( |
30 const DesktopCaptureOptions& options) | 32 const DesktopCaptureOptions& options) |
31 : callback_(nullptr) {} | 33 : callback_(nullptr) {} |
32 | 34 |
33 ScreenCapturerWinDirectx::~ScreenCapturerWinDirectx() {} | 35 ScreenCapturerWinDirectx::~ScreenCapturerWinDirectx() {} |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 132 |
131 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); | 133 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); |
132 if (id >= 0 && id < screen_count) { | 134 if (id >= 0 && id < screen_count) { |
133 current_screen_id = id; | 135 current_screen_id = id; |
134 return true; | 136 return true; |
135 } | 137 } |
136 return false; | 138 return false; |
137 } | 139 } |
138 | 140 |
139 } // namespace webrtc | 141 } // namespace webrtc |
OLD | NEW |