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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ |
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ |
13 | 13 |
14 #include <stddef.h> | 14 #include <stddef.h> |
15 | 15 |
16 #include "webrtc/base/scoped_ptr.h" | 16 #include <memory> |
| 17 |
17 #include "webrtc/modules/desktop_capture/desktop_capture_types.h" | 18 #include "webrtc/modules/desktop_capture/desktop_capture_types.h" |
18 #include "webrtc/modules/desktop_capture/shared_memory.h" | 19 #include "webrtc/modules/desktop_capture/shared_memory.h" |
19 | 20 |
20 namespace webrtc { | 21 namespace webrtc { |
21 | 22 |
22 class DesktopFrame; | 23 class DesktopFrame; |
23 class DesktopRegion; | 24 class DesktopRegion; |
24 | 25 |
25 // Abstract interface for screen and window capturers. | 26 // Abstract interface for screen and window capturers. |
26 class DesktopCapturer { | 27 class DesktopCapturer { |
(...skipping 14 matching lines...) Expand all Loading... |
41 | 42 |
42 // Called at the beginning of a capturing session. |callback| must remain | 43 // Called at the beginning of a capturing session. |callback| must remain |
43 // valid until capturer is destroyed. | 44 // valid until capturer is destroyed. |
44 virtual void Start(Callback* callback) = 0; | 45 virtual void Start(Callback* callback) = 0; |
45 | 46 |
46 // Sets SharedMemoryFactory that will be used to create buffers for the | 47 // Sets SharedMemoryFactory that will be used to create buffers for the |
47 // captured frames. The factory can be invoked on a thread other than the one | 48 // captured frames. The factory can be invoked on a thread other than the one |
48 // where Capture() is called. It will be destroyed on the same thread. Shared | 49 // where Capture() is called. It will be destroyed on the same thread. Shared |
49 // memory is currently supported only by some DesktopCapturer implementations. | 50 // memory is currently supported only by some DesktopCapturer implementations. |
50 virtual void SetSharedMemoryFactory( | 51 virtual void SetSharedMemoryFactory( |
51 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) {} | 52 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {} |
52 | 53 |
53 // Captures next frame. |region| specifies region of the capture target that | 54 // Captures next frame. |region| specifies region of the capture target that |
54 // should be fresh in the resulting frame. The frame may also include fresh | 55 // should be fresh in the resulting frame. The frame may also include fresh |
55 // data for areas outside |region|. In that case capturer will include these | 56 // data for areas outside |region|. In that case capturer will include these |
56 // areas in updated_region() of the frame. |region| is specified relative to | 57 // areas in updated_region() of the frame. |region| is specified relative to |
57 // the top left corner of the capture target. Pending capture operations are | 58 // the top left corner of the capture target. Pending capture operations are |
58 // canceled when DesktopCapturer is deleted. | 59 // canceled when DesktopCapturer is deleted. |
59 virtual void Capture(const DesktopRegion& region) = 0; | 60 virtual void Capture(const DesktopRegion& region) = 0; |
60 | 61 |
61 // Sets the window to be excluded from the captured image in the future | 62 // Sets the window to be excluded from the captured image in the future |
62 // Capture calls. Used to exclude the screenshare notification window for | 63 // Capture calls. Used to exclude the screenshare notification window for |
63 // screen capturing. | 64 // screen capturing. |
64 virtual void SetExcludedWindow(WindowId window) {} | 65 virtual void SetExcludedWindow(WindowId window) {} |
65 }; | 66 }; |
66 | 67 |
67 } // namespace webrtc | 68 } // namespace webrtc |
68 | 69 |
69 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ | 70 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ |
70 | 71 |
OLD | NEW |