Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: webrtc/modules/desktop_capture/desktop_capturer.h

Issue 2409833002: Remove DesktopRegion parameter in DesktopCapturer::Capture. (Closed)
Patch Set: Change Capture2 to CaptureFrame Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Captures next frame. |region| specifies region of the capture target that 69 // This is a legacy interface, consumers should call CaptureFrame() function.
70 // should be fresh in the resulting frame. The frame may also include fresh 70 virtual void Capture(const DesktopRegion& region) { CaptureFrame(); }
71 // data for areas outside |region|. In that case capturer will include these 71
72 // areas in updated_region() of the frame. |region| is specified relative to 72 // Captures next frame, and involve callback provided by Start() function.
73 // the top left corner of the capture target. Pending capture operations are 73 // Pending capture requests are canceled when DesktopCapturer is deleted.
74 // canceled when DesktopCapturer is deleted. 74 virtual void CaptureFrame() { Capture(DesktopRegion()); }
75 virtual void Capture(const DesktopRegion& region) = 0;
76 75
77 // 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
78 // Capture calls. Used to exclude the screenshare notification window for 77 // Capture calls. Used to exclude the screenshare notification window for
79 // screen capturing. 78 // screen capturing.
80 virtual void SetExcludedWindow(WindowId window) {} 79 virtual void SetExcludedWindow(WindowId window) {}
81 }; 80 };
82 81
83 } // namespace webrtc 82 } // namespace webrtc
84 83
85 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ 84 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_
86 85
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698