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

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

Issue 2703123002: Skips the first frame in DxgiDuplicatorController (Closed)
Patch Set: Resolve review comments Created 3 years, 10 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 7470db9eeb99a05b18ca210109e34448491ca903..310eff02c99123ee0b851b37d79f3812c39e6d3d 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h
+++ b/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h
@@ -171,7 +171,7 @@ class DxgiDuplicatorController {
// Updates Context if needed.
void Setup(Context* context);
- // Do the real duplication work. |monitor_id < 0| to capture entire screen.
+ // Does the real duplication work. |monitor_id < 0| to capture entire screen.
bool DoDuplicate(Context* context,
int monitor_id,
SharedDesktopFrame* target);
@@ -180,6 +180,26 @@ class DxgiDuplicatorController {
int monitor_id,
SharedDesktopFrame* target);
+ // Captures all monitors.
+ bool DoDuplicateAll(Context* context, SharedDesktopFrame* target);
+
+ // Captures one monitor.
+ bool DoDuplicateOne(Context* context,
+ int monitor_id,
+ SharedDesktopFrame* target);
+
+ // The minimum GetNumFramesCaptured() returned by |duplicators_|.
+ int64_t GetNumFramesCaptured() const;
+
+ int ScreenCountUnlocked();
+
+ // Retries DoDuplicateAll() for several times until GetNumFramesCaptured() is
+ // large enough. Returns false if DoDuplicateAll() returns false, or
+ // GetNumFramesCaptured() has never reached the requirement.
+ // According to http://crbug.com/682112, dxgi capturer returns a black frame
+ // during first several capture attempts.
+ bool EnsureFrameCaptured(Context* context, SharedDesktopFrame* target);
+
// This lock must be locked whenever accessing any of the following objects.
rtc::CriticalSection lock_;

Powered by Google App Engine
This is Rietveld 408576698