Index: webrtc/modules/desktop_capture/win/screen_capture_utils.cc |
diff --git a/webrtc/modules/desktop_capture/win/screen_capture_utils.cc b/webrtc/modules/desktop_capture/win/screen_capture_utils.cc |
index 9fa5c8b12db42a1816998c224ea25947b2b7b1ff..d06c869567382d223a2d27aaf38ee424c7063b87 100644 |
--- a/webrtc/modules/desktop_capture/win/screen_capture_utils.cc |
+++ b/webrtc/modules/desktop_capture/win/screen_capture_utils.cc |
@@ -13,11 +13,16 @@ |
#include <windows.h> |
#include "webrtc/rtc_base/checks.h" |
+#include "webrtc/rtc_base/win32.h" |
namespace webrtc { |
-bool GetScreenList(DesktopCapturer::SourceList* screens) { |
- RTC_DCHECK(screens->size() == 0); |
+bool GetScreenList(DesktopCapturer::SourceList* screens, |
+ std::vector<std::string>* device_names /* = nullptr */) { |
+ RTC_DCHECK_EQ(screens->size(), 0U); |
+ if (device_names) { |
+ RTC_DCHECK_EQ(device_names->size(), 0U); |
+ } |
BOOL enum_result = TRUE; |
for (int device_index = 0;; ++device_index) { |
@@ -34,6 +39,9 @@ bool GetScreenList(DesktopCapturer::SourceList* screens) { |
continue; |
screens->push_back({device_index, std::string()}); |
+ if (device_names) { |
+ device_names->push_back(rtc::ToUtf8(device.DeviceName)); |
+ } |
} |
return true; |
} |