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" | 22 #include "webrtc/base/scoped_ptr.h" |
23 #include "webrtc/base/scoped_ref_ptr.h" | 23 #include "webrtc/base/scoped_ref_ptr.h" |
24 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 24 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
25 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 25 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
26 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" | 26 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" |
27 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" | 27 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" |
28 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" | 28 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" |
29 #include "webrtc/system_wrappers/interface/logging.h" | 29 #include "webrtc/system_wrappers/include/logging.h" |
30 | 30 |
31 namespace webrtc { | 31 namespace webrtc { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 // Convenience wrapper for XGetWindowProperty() results. | 35 // Convenience wrapper for XGetWindowProperty() results. |
36 template <class PropertyType> | 36 template <class PropertyType> |
37 class XWindowProperty { | 37 class XWindowProperty { |
38 public: | 38 public: |
39 XWindowProperty(Display* display, Window window, Atom property) | 39 XWindowProperty(Display* display, Window window, Atom property) |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 } // namespace | 427 } // namespace |
428 | 428 |
429 // static | 429 // static |
430 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { | 430 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { |
431 if (!options.x_display()) | 431 if (!options.x_display()) |
432 return NULL; | 432 return NULL; |
433 return new WindowCapturerLinux(options); | 433 return new WindowCapturerLinux(options); |
434 } | 434 } |
435 | 435 |
436 } // namespace webrtc | 436 } // namespace webrtc |
OLD | NEW |