Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h

Issue 2937663003: Ensure Dxgi duplicator works correctly in session 0 (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // D3D_FEATURE_LEVEL has been retrieved from underlying OS APIs. 52 // D3D_FEATURE_LEVEL has been retrieved from underlying OS APIs.
53 D3D_FEATURE_LEVEL min_feature_level; 53 D3D_FEATURE_LEVEL min_feature_level;
54 D3D_FEATURE_LEVEL max_feature_level; 54 D3D_FEATURE_LEVEL max_feature_level;
55 55
56 // TODO(zijiehe): Add more fields, such as manufacturer name, mode, driver 56 // TODO(zijiehe): Add more fields, such as manufacturer name, mode, driver
57 // version. 57 // version.
58 }; 58 };
59 59
60 enum class Result { 60 enum class Result {
61 SUCCEEDED, 61 SUCCEEDED,
62 UNSUPPORTED_SESSION,
62 FRAME_PREPARE_FAILED, 63 FRAME_PREPARE_FAILED,
63 INITIALIZATION_FAILED, 64 INITIALIZATION_FAILED,
64 DUPLICATION_FAILED, 65 DUPLICATION_FAILED,
65 INVALID_MONITOR_ID, 66 INVALID_MONITOR_ID,
66 }; 67 };
67 68
68 // Returns the singleton instance of DxgiDuplicatorController. 69 // Returns the singleton instance of DxgiDuplicatorController.
69 static DxgiDuplicatorController* Instance(); 70 static DxgiDuplicatorController* Instance();
70 71
71 // Destructs current instance. We need to make sure COM components and their 72 // Destructs current instance. We need to make sure COM components and their
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 rtc::CriticalSection lock_; 190 rtc::CriticalSection lock_;
190 191
191 // A self-incremented integer to compare with the one in Context. It ensures 192 // A self-incremented integer to compare with the one in Context. It ensures
192 // a Context instance is always initialized after DxgiDuplicatorController. 193 // a Context instance is always initialized after DxgiDuplicatorController.
193 int identity_ = 0; 194 int identity_ = 0;
194 DesktopRect desktop_rect_; 195 DesktopRect desktop_rect_;
195 DesktopVector dpi_; 196 DesktopVector dpi_;
196 std::vector<DxgiAdapterDuplicator> duplicators_; 197 std::vector<DxgiAdapterDuplicator> duplicators_;
197 D3dInfo d3d_info_; 198 D3dInfo d3d_info_;
198 ResolutionChangeDetector resolution_change_detector_; 199 ResolutionChangeDetector resolution_change_detector_;
200 // A number to indicate how many succeeded duplications have been performed.
201 uint32_t succeeded_duplications_ = 0;
199 }; 202 };
200 203
201 } // namespace webrtc 204 } // namespace webrtc
202 205
203 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_DUPLICATOR_CONTROLLER_H_ 206 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_DUPLICATOR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698