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 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 // valid until capturer is destroyed. | 59 // valid until capturer is destroyed. |
60 virtual void Start(Callback* callback) = 0; | 60 virtual void Start(Callback* callback) = 0; |
61 | 61 |
62 // Sets SharedMemoryFactory that will be used to create buffers for the | 62 // Sets SharedMemoryFactory that will be used to create buffers for the |
63 // captured frames. The factory can be invoked on a thread other than the one | 63 // captured frames. The factory can be invoked on a thread other than the one |
64 // where Capture() is called. It will be destroyed on the same thread. Shared | 64 // where Capture() is called. It will be destroyed on the same thread. Shared |
65 // memory is currently supported only by some DesktopCapturer implementations. | 65 // memory is currently supported only by some DesktopCapturer implementations. |
66 virtual void SetSharedMemoryFactory( | 66 virtual void SetSharedMemoryFactory( |
67 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {} | 67 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {} |
68 | 68 |
69 // This is a legacy interface, consumers should call CaptureFrame() function. | |
70 virtual void Capture(const DesktopRegion& region) { CaptureFrame(); } | |
71 | |
72 // Captures next frame, and involve callback provided by Start() function. | 69 // Captures next frame, and involve callback provided by Start() function. |
73 // Pending capture requests are canceled when DesktopCapturer is deleted. | 70 // Pending capture requests are canceled when DesktopCapturer is deleted. |
74 virtual void CaptureFrame() { Capture(DesktopRegion()); } | 71 virtual void Capture() { CaptureFrame(); } |
Sergey Ulanov
2016/10/18 23:37:10
I think CaptureFrame() is a better name than Captu
Hzj_jie
2016/10/19 00:49:17
No opinion, yes, I can remove old Capture() functi
| |
72 | |
73 // This is a legacy interface, consumers should call Capture() function. | |
74 virtual void CaptureFrame() { Capture(); } | |
75 | 75 |
76 // Sets the window to be excluded from the captured image in the future | 76 // Sets the window to be excluded from the captured image in the future |
77 // Capture calls. Used to exclude the screenshare notification window for | 77 // Capture calls. Used to exclude the screenshare notification window for |
78 // screen capturing. | 78 // screen capturing. |
79 virtual void SetExcludedWindow(WindowId window) {} | 79 virtual void SetExcludedWindow(WindowId window) {} |
80 }; | 80 }; |
81 | 81 |
82 } // namespace webrtc | 82 } // namespace webrtc |
83 | 83 |
84 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ | 84 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ |
85 | 85 |
OLD | NEW |