sergeyu@chromium.org | 91685dc | 2013-10-12 22:40:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
| 12 | |
| 13 | namespace webrtc { |
| 14 | |
| 15 | DesktopCaptureOptions::DesktopCaptureOptions() |
| 16 | : use_update_notifications_(true), |
| 17 | disable_effects_(true) { |
| 18 | #if defined(USE_X11) |
| 19 | // XDamage is often broken, so don't use it by default. |
| 20 | use_update_notifications_ = false; |
| 21 | #endif |
| 22 | } |
| 23 | |
| 24 | DesktopCaptureOptions::~DesktopCaptureOptions() {} |
| 25 | |
| 26 | // static |
| 27 | DesktopCaptureOptions DesktopCaptureOptions::CreateDefault() { |
| 28 | DesktopCaptureOptions result; |
| 29 | #if defined(USE_X11) |
| 30 | result.set_x_display(SharedXDisplay::CreateDefault()); |
| 31 | #endif |
jiayl@webrtc.org | 54ad929 | 2014-01-29 21:59:12 +0000 | [diff] [blame] | 32 | #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) |
| 33 | result.set_configuration_monitor(new DesktopConfigurationMonitor()); |
| 34 | #endif |
sergeyu@chromium.org | 91685dc | 2013-10-12 22:40:05 +0000 | [diff] [blame] | 35 | return result; |
| 36 | } |
| 37 | |
| 38 | } // namespace webrtc |