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 | 10 |
11 #include "webrtc/modules/desktop_capture/window_capturer.h" | 11 #include "webrtc/modules/desktop_capture/window_capturer.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <string.h> | 14 #include <string.h> |
15 #include <X11/Xatom.h> | 15 #include <X11/Xatom.h> |
16 #include <X11/extensions/Xcomposite.h> | 16 #include <X11/extensions/Xcomposite.h> |
17 #include <X11/extensions/Xrender.h> | 17 #include <X11/extensions/Xrender.h> |
18 #include <X11/Xutil.h> | 18 #include <X11/Xutil.h> |
19 | 19 |
20 #include <algorithm> | 20 #include <algorithm> |
21 | 21 |
22 #include "webrtc/base/scoped_ptr.h" | |
23 #include "webrtc/base/scoped_ref_ptr.h" | 22 #include "webrtc/base/scoped_ref_ptr.h" |
24 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 23 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
25 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 24 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
26 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" | 25 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" |
27 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" | 26 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" |
28 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" | 27 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" |
29 #include "webrtc/system_wrappers/include/logging.h" | 28 #include "webrtc/system_wrappers/include/logging.h" |
30 | 29 |
31 namespace webrtc { | 30 namespace webrtc { |
32 | 31 |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 } // namespace | 426 } // namespace |
428 | 427 |
429 // static | 428 // static |
430 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { | 429 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { |
431 if (!options.x_display()) | 430 if (!options.x_display()) |
432 return NULL; | 431 return NULL; |
433 return new WindowCapturerLinux(options); | 432 return new WindowCapturerLinux(options); |
434 } | 433 } |
435 | 434 |
436 } // namespace webrtc | 435 } // namespace webrtc |
OLD | NEW |