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

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

Issue 2971393002: Output DeviceName from various windows ScreenCapturer related implementations (Closed)
Patch Set: Resolve review comments Created 3 years, 5 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 0aa7eddcaa652a08f5c476c03f7651042d7a608a..47e078f4ad27f3925bb69e868aad13578c732c4c 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h
+++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h
@@ -17,6 +17,7 @@
#include <DXGI1_2.h>
#include <memory>
+#include <string>
#include <vector>
#include "webrtc/modules/desktop_capture/desktop_frame_rotation.h"
@@ -68,6 +69,9 @@ class DxgiOutputDuplicator {
// Returns the desktop rect covered by this DxgiOutputDuplicator.
DesktopRect desktop_rect() const { return desktop_rect_; }
+ // Returns the device name from DXGI_OUTPUT_DESC in utf8 encoding.
+ const std::string& device_name() const { return device_name_; }
+
void Setup(Context* context);
void Unregister(const Context* const context);
@@ -112,6 +116,7 @@ class DxgiOutputDuplicator {
const D3dDevice device_;
const Microsoft::WRL::ComPtr<IDXGIOutput1> output_;
+ const std::string device_name_;
DesktopRect desktop_rect_;
Microsoft::WRL::ComPtr<IDXGIOutputDuplication> duplication_;
DXGI_OUTDUPL_DESC desc_;

Powered by Google App Engine
This is Rietveld 408576698