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

Unified Diff: webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h

Issue 2937663003: Ensure Dxgi duplicator works correctly in session 0 (Closed)
Patch Set: Update logs 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h
diff --git a/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h b/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h
index 308b2f3a746500fbacc9e2c2216585abe8168633..a254b6d141a4d780a742234947784cea0dd2f018 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h
+++ b/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h
@@ -60,6 +60,7 @@ class DxgiDuplicatorController {
enum class Result {
SUCCEEDED,
+ UNSUPPORTED_SESSION,
FRAME_PREPARE_FAILED,
INITIALIZATION_FAILED,
DUPLICATION_FAILED,
@@ -74,7 +75,9 @@ class DxgiDuplicatorController {
// Detects whether the system supports DXGI based capturer.
bool IsSupported();
- // Returns a copy of D3dInfo composed by last Initialize() function call.
+ // Returns a copy of D3dInfo composed by last Initialize() function call. This
+ // function always copies the latest information into |info|. But once the
+ // function returns false, the information in |info| may not accurate.
bool RetrieveD3dInfo(D3dInfo* info);
// Captures current screen and writes into |frame|.
@@ -211,6 +214,8 @@ class DxgiDuplicatorController {
std::vector<DxgiAdapterDuplicator> duplicators_;
D3dInfo d3d_info_;
ResolutionChangeDetector resolution_change_detector_;
+ // A number to indicate how many succeeded duplications have been performed.
+ uint32_t succeeded_duplications_ = 0;
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698