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

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capture_utils.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_
13 13
14 #include <vector>
15 #include <string>
16
14 #include "webrtc/modules/desktop_capture/desktop_capturer.h" 17 #include "webrtc/modules/desktop_capture/desktop_capturer.h"
15 18
16 namespace webrtc { 19 namespace webrtc {
17 20
18 // Output the list of active screens into |screens|. Returns true if succeeded, 21 // Output the list of active screens into |screens|. Returns true if succeeded,
19 // or false if it fails to enumerate the display devices. 22 // or false if it fails to enumerate the display devices. If the |device_names|
20 bool GetScreenList(DesktopCapturer::SourceList* screens); 23 // is provided, it will be filled with the DISPLAY_DEVICE.DeviceName in UTF-8
24 // encoding. Once this function returns true, consumers can always assume that
25 // |screens|[i] and |device_names|[i] indicate the same monitor on the system.
26 bool GetScreenList(DesktopCapturer::SourceList* screens,
27 std::vector<std::string>* device_names = nullptr);
21 28
22 // Returns true if |screen| is a valid screen. The screen device key is 29 // Returns true if |screen| is a valid screen. The screen device key is
23 // returned through |device_key| if the screen is valid. The device key can be 30 // returned through |device_key| if the screen is valid. The device key can be
24 // used in GetScreenRect to verify the screen matches the previously obtained 31 // used in GetScreenRect to verify the screen matches the previously obtained
25 // id. 32 // id.
26 bool IsScreenValid(DesktopCapturer::SourceId screen, std::wstring* device_key); 33 bool IsScreenValid(DesktopCapturer::SourceId screen, std::wstring* device_key);
27 34
28 // Get the rect of the screen identified by |screen|, relative to the primary 35 // Get the rect of the screen identified by |screen|, relative to the primary
29 // display's top-left. If the screen device key does not match |device_key|, or 36 // display's top-left. If the screen device key does not match |device_key|, or
30 // the screen does not exist, or any error happens, an empty rect is returned. 37 // the screen does not exist, or any error happens, an empty rect is returned.
31 DesktopRect GetScreenRect(DesktopCapturer::SourceId screen, 38 DesktopRect GetScreenRect(DesktopCapturer::SourceId screen,
32 const std::wstring& device_key); 39 const std::wstring& device_key);
33 40
34 } // namespace webrtc 41 } // namespace webrtc
35 42
36 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ 43 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698