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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ |
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ |
13 | 13 |
14 #include <wrl/client.h> | 14 #include <wrl/client.h> |
15 | 15 |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/modules/desktop_capture/desktop_geometry.h" | 18 #include "webrtc/modules/desktop_capture/desktop_geometry.h" |
19 #include "webrtc/modules/desktop_capture/desktop_region.h" | |
20 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 19 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" |
21 #include "webrtc/modules/desktop_capture/win/d3d_device.h" | 20 #include "webrtc/modules/desktop_capture/win/d3d_device.h" |
| 21 #include "webrtc/modules/desktop_capture/win/dxgi_context.h" |
22 #include "webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h" | 22 #include "webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 | 25 |
26 // A container of DxgiOutputDuplicators to duplicate monitors attached to a | 26 // A container of DxgiOutputDuplicators to duplicate monitors attached to a |
27 // single video card. | 27 // single video card. |
28 class DxgiAdapterDuplicator { | 28 class DxgiAdapterDuplicator { |
29 public: | 29 public: |
30 struct Context { | 30 using Context = DxgiAdapterContext; |
31 Context(); | |
32 Context(const Context& other); | |
33 ~Context(); | |
34 | |
35 // Child DxgiOutputDuplicator::Context belongs to this | |
36 // DxgiAdapterDuplicator::Context. | |
37 std::vector<DxgiOutputDuplicator::Context> contexts; | |
38 }; | |
39 | 31 |
40 // Creates an instance of DxgiAdapterDuplicator from a D3dDevice. Only | 32 // Creates an instance of DxgiAdapterDuplicator from a D3dDevice. Only |
41 // DxgiDuplicatorController can create an instance. | 33 // DxgiDuplicatorController can create an instance. |
42 explicit DxgiAdapterDuplicator(const D3dDevice& device); | 34 explicit DxgiAdapterDuplicator(const D3dDevice& device); |
43 | 35 |
44 // Move constructor, to make it possible to store instances of | 36 // Move constructor, to make it possible to store instances of |
45 // DxgiAdapterDuplicator in std::vector<>. | 37 // DxgiAdapterDuplicator in std::vector<>. |
46 DxgiAdapterDuplicator(DxgiAdapterDuplicator&& other); | 38 DxgiAdapterDuplicator(DxgiAdapterDuplicator&& other); |
47 | 39 |
48 ~DxgiAdapterDuplicator(); | 40 ~DxgiAdapterDuplicator(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 bool DoInitialize(); | 75 bool DoInitialize(); |
84 | 76 |
85 const D3dDevice device_; | 77 const D3dDevice device_; |
86 std::vector<DxgiOutputDuplicator> duplicators_; | 78 std::vector<DxgiOutputDuplicator> duplicators_; |
87 DesktopRect desktop_rect_; | 79 DesktopRect desktop_rect_; |
88 }; | 80 }; |
89 | 81 |
90 } // namespace webrtc | 82 } // namespace webrtc |
91 | 83 |
92 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ | 84 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ |
OLD | NEW |