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

Unified Diff: webrtc/modules/desktop_capture/win/dxgi_output_duplicator.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_output_duplicator.h
diff --git a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h
index 02a781487e932a104919f86b2d4228b2f02c9022..5a7053ab25e4e30223166c44cd78371e41a552c2 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h
+++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h
@@ -72,9 +72,14 @@ class DxgiOutputDuplicator {
// Returns the desktop rect covered by this DxgiOutputDuplicator.
DesktopRect desktop_rect() const { return desktop_rect_; }
- private:
- friend class DxgiAdapterDuplicator;
+ void Setup(Context* context);
+
+ void Unregister(const Context* const context);
+
+ // How many frames have been captured by this DxigOutputDuplicator.
+ int64_t num_frames_captured() const;
+ private:
// Detects updated region translated by offset from IDXGIOutput1. This
// function will set the |updated_region| as entire DesktopRect starts from
// offset if it failed to execute Windows APIs.
@@ -97,10 +102,6 @@ class DxgiOutputDuplicator {
// by offset.
DesktopRect TranslatedDesktopRect(DesktopVector offset);
- void Setup(Context* context);
-
- void Unregister(const Context* const context);
-
// Spreads changes from |context| to other registered Context(s) in
// contexts_.
void SpreadContextChange(const Context* const context);
@@ -126,6 +127,8 @@ class DxgiOutputDuplicator {
// |last_frame_|.
std::unique_ptr<SharedDesktopFrame> last_frame_;
DesktopVector last_frame_offset_;
+
+ int64_t num_frames_captured_;
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698