OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ | 10 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" | 21 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" |
22 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" | 22 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" |
23 #endif | 23 #endif |
24 | 24 |
25 namespace webrtc { | 25 namespace webrtc { |
26 | 26 |
27 // An object that stores initialization parameters for screen and window | 27 // An object that stores initialization parameters for screen and window |
28 // capturers. | 28 // capturers. |
29 class DesktopCaptureOptions { | 29 class DesktopCaptureOptions { |
30 public: | 30 public: |
31 // Creates an empty Options instance (e.g. without X display). | |
32 DesktopCaptureOptions(); | |
33 ~DesktopCaptureOptions(); | |
34 | |
35 // Returns instance of DesktopCaptureOptions with default parameters. On Linux | 31 // Returns instance of DesktopCaptureOptions with default parameters. On Linux |
36 // also initializes X window connection. x_display() will be set to null if | 32 // also initializes X window connection. x_display() will be set to null if |
37 // X11 connection failed (e.g. DISPLAY isn't set). | 33 // X11 connection failed (e.g. DISPLAY isn't set). |
38 static DesktopCaptureOptions CreateDefault(); | 34 static DesktopCaptureOptions CreateDefault(); |
39 | 35 |
40 #if defined(USE_X11) | 36 #if defined(USE_X11) |
41 SharedXDisplay* x_display() const { return x_display_; } | 37 SharedXDisplay* x_display() const { return x_display_; } |
42 void set_x_display(rtc::scoped_refptr<SharedXDisplay> x_display) { | 38 void set_x_display(rtc::scoped_refptr<SharedXDisplay> x_display) { |
43 x_display_ = x_display; | 39 x_display_ = x_display; |
44 } | 40 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 disable_effects_ = disable_effects; | 72 disable_effects_ = disable_effects; |
77 } | 73 } |
78 | 74 |
79 #if defined(WEBRTC_WIN) | 75 #if defined(WEBRTC_WIN) |
80 bool allow_use_magnification_api() const { | 76 bool allow_use_magnification_api() const { |
81 return allow_use_magnification_api_; | 77 return allow_use_magnification_api_; |
82 } | 78 } |
83 void set_allow_use_magnification_api(bool allow) { | 79 void set_allow_use_magnification_api(bool allow) { |
84 allow_use_magnification_api_ = allow; | 80 allow_use_magnification_api_ = allow; |
85 } | 81 } |
| 82 // Allowing directx based capturer or not, this capturer works on windows 7 |
| 83 // with platform update / windows 8 or upper. |
| 84 bool allow_directx_capturer() const { |
| 85 return allow_directx_capturer_; |
| 86 } |
| 87 void set_allow_directx_capturer(bool enabled) { |
| 88 allow_directx_capturer_ = enabled; |
| 89 } |
86 #endif | 90 #endif |
87 | 91 |
88 private: | 92 private: |
89 #if defined(USE_X11) | 93 #if defined(USE_X11) |
90 rtc::scoped_refptr<SharedXDisplay> x_display_; | 94 rtc::scoped_refptr<SharedXDisplay> x_display_; |
91 #endif | 95 #endif |
92 | 96 |
93 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) | 97 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) |
94 rtc::scoped_refptr<DesktopConfigurationMonitor> configuration_monitor_; | 98 rtc::scoped_refptr<DesktopConfigurationMonitor> configuration_monitor_; |
95 rtc::scoped_refptr<FullScreenChromeWindowDetector> | 99 rtc::scoped_refptr<FullScreenChromeWindowDetector> |
96 full_screen_window_detector_; | 100 full_screen_window_detector_; |
97 #endif | 101 #endif |
98 | 102 |
99 #if defined(WEBRTC_WIN) | 103 #if defined(WEBRTC_WIN) |
100 bool allow_use_magnification_api_; | 104 bool allow_use_magnification_api_ = false; |
| 105 bool allow_directx_capturer_ = false; |
101 #endif | 106 #endif |
102 bool use_update_notifications_; | 107 #if defined(USE_X11) |
103 bool disable_effects_; | 108 bool use_update_notifications_ = false; |
| 109 #else |
| 110 bool use_update_notifications_ = true; |
| 111 #endif |
| 112 bool disable_effects_ = true; |
104 }; | 113 }; |
105 | 114 |
106 } // namespace webrtc | 115 } // namespace webrtc |
107 | 116 |
108 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ | 117 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ |
OLD | NEW |