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 |
(...skipping 22 matching lines...) Expand all Loading... |
33 // duplicator or not. If a previous IsSupported() function call returns true, | 33 // duplicator or not. If a previous IsSupported() function call returns true, |
34 // but a later Duplicate() returns false, this usually means the display mode is | 34 // but a later Duplicate() returns false, this usually means the display mode is |
35 // changing. Consumers should retry after a while. (Typically 50 milliseconds, | 35 // changing. Consumers should retry after a while. (Typically 50 milliseconds, |
36 // but according to hardware performance, this time may vary.) | 36 // but according to hardware performance, this time may vary.) |
37 class DxgiDuplicatorController { | 37 class DxgiDuplicatorController { |
38 public: | 38 public: |
39 // A context to store the status of a single consumer of | 39 // A context to store the status of a single consumer of |
40 // DxgiDuplicatorController. | 40 // DxgiDuplicatorController. |
41 class Context { | 41 class Context { |
42 public: | 42 public: |
| 43 Context(); |
43 // Unregister this Context instance from all Dxgi duplicators during | 44 // Unregister this Context instance from all Dxgi duplicators during |
44 // destructing. | 45 // destructing. |
45 ~Context(); | 46 ~Context(); |
46 | 47 |
47 private: | 48 private: |
48 friend class DxgiDuplicatorController; | 49 friend class DxgiDuplicatorController; |
49 | 50 |
50 // A Context will have an exactly same |identity_| as | 51 // A Context will have an exactly same |identity_| as |
51 // DxgiDuplicatorController, to ensure it has been correctly setted up after | 52 // DxgiDuplicatorController, to ensure it has been correctly setted up after |
52 // each DxgiDuplicatorController::Initialize(). | 53 // each DxgiDuplicatorController::Initialize(). |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // ensure a Context has been initialized after DxgiDuplicatorController. | 151 // ensure a Context has been initialized after DxgiDuplicatorController. |
151 int identity_ = 0; | 152 int identity_ = 0; |
152 DesktopRect desktop_rect_; | 153 DesktopRect desktop_rect_; |
153 DesktopVector dpi_; | 154 DesktopVector dpi_; |
154 std::vector<DxgiAdapterDuplicator> duplicators_; | 155 std::vector<DxgiAdapterDuplicator> duplicators_; |
155 }; | 156 }; |
156 | 157 |
157 } // namespace webrtc | 158 } // namespace webrtc |
158 | 159 |
159 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_DUPLICATOR_CONTROLLER_H_ | 160 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_DUPLICATOR_CONTROLLER_H_ |
OLD | NEW |