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 <assert.h> | 11 #include <assert.h> |
12 #include <string.h> | 12 #include <string.h> |
13 #include <X11/Xatom.h> | 13 #include <X11/Xatom.h> |
14 #include <X11/extensions/Xcomposite.h> | 14 #include <X11/extensions/Xcomposite.h> |
15 #include <X11/extensions/Xrender.h> | 15 #include <X11/extensions/Xrender.h> |
16 #include <X11/Xutil.h> | 16 #include <X11/Xutil.h> |
17 | 17 |
18 #include <algorithm> | 18 #include <algorithm> |
19 | 19 |
20 #include "webrtc/base/constructormagic.h" | 20 #include "webrtc/base/constructormagic.h" |
| 21 #include "webrtc/base/logging.h" |
21 #include "webrtc/base/scoped_ref_ptr.h" | 22 #include "webrtc/base/scoped_ref_ptr.h" |
22 #include "webrtc/modules/desktop_capture/desktop_capturer.h" | 23 #include "webrtc/modules/desktop_capture/desktop_capturer.h" |
23 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 24 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
24 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 25 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
25 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" | 26 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" |
26 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" | 27 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" |
27 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" | 28 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" |
28 #include "webrtc/system_wrappers/include/logging.h" | |
29 | 29 |
30 namespace webrtc { | 30 namespace webrtc { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // Convenience wrapper for XGetWindowProperty() results. | 34 // Convenience wrapper for XGetWindowProperty() results. |
35 template <class PropertyType> | 35 template <class PropertyType> |
36 class XWindowProperty { | 36 class XWindowProperty { |
37 public: | 37 public: |
38 XWindowProperty(Display* display, Window window, Atom property) { | 38 XWindowProperty(Display* display, Window window, Atom property) { |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 422 |
423 // static | 423 // static |
424 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer( | 424 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer( |
425 const DesktopCaptureOptions& options) { | 425 const DesktopCaptureOptions& options) { |
426 if (!options.x_display()) | 426 if (!options.x_display()) |
427 return nullptr; | 427 return nullptr; |
428 return std::unique_ptr<DesktopCapturer>(new WindowCapturerLinux(options)); | 428 return std::unique_ptr<DesktopCapturer>(new WindowCapturerLinux(options)); |
429 } | 429 } |
430 | 430 |
431 } // namespace webrtc | 431 } // namespace webrtc |
OLD | NEW |