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

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

Issue 1678073003: Cleanup shared memory handling in DesktopCapturer interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/cropping_window_capturer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 11 matching lines...) Expand all
22 // whole screen and crops the video frame to the window area when the captured 22 // whole screen and crops the video frame to the window area when the captured
23 // window is on top. 23 // window is on top.
24 class CroppingWindowCapturer : public WindowCapturer, 24 class CroppingWindowCapturer : public WindowCapturer,
25 public DesktopCapturer::Callback { 25 public DesktopCapturer::Callback {
26 public: 26 public:
27 static WindowCapturer* Create(const DesktopCaptureOptions& options); 27 static WindowCapturer* Create(const DesktopCaptureOptions& options);
28 virtual ~CroppingWindowCapturer(); 28 virtual ~CroppingWindowCapturer();
29 29
30 // DesktopCapturer implementation. 30 // DesktopCapturer implementation.
31 void Start(DesktopCapturer::Callback* callback) override; 31 void Start(DesktopCapturer::Callback* callback) override;
32 void SetSharedMemoryFactory(
33 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) override;
32 void Capture(const DesktopRegion& region) override; 34 void Capture(const DesktopRegion& region) override;
33 void SetExcludedWindow(WindowId window) override; 35 void SetExcludedWindow(WindowId window) override;
34 36
35 // WindowCapturer implementation. 37 // WindowCapturer implementation.
36 bool GetWindowList(WindowList* windows) override; 38 bool GetWindowList(WindowList* windows) override;
37 bool SelectWindow(WindowId id) override; 39 bool SelectWindow(WindowId id) override;
38 bool BringSelectedWindowToFront() override; 40 bool BringSelectedWindowToFront() override;
39 41
40 // DesktopCapturer::Callback implementation, passed to |screen_capturer_| to 42 // DesktopCapturer::Callback implementation, passed to |screen_capturer_| to
41 // intercept the capture result. 43 // intercept the capture result.
42 SharedMemory* CreateSharedMemory(size_t size) override;
43 void OnCaptureCompleted(DesktopFrame* frame) override; 44 void OnCaptureCompleted(DesktopFrame* frame) override;
44 45
45 protected: 46 protected:
46 explicit CroppingWindowCapturer(const DesktopCaptureOptions& options); 47 explicit CroppingWindowCapturer(const DesktopCaptureOptions& options);
47 48
48 // The platform implementation should override these methods. 49 // The platform implementation should override these methods.
49 50
50 // Returns true if it is OK to capture the whole screen and crop to the 51 // Returns true if it is OK to capture the whole screen and crop to the
51 // selected window, i.e. the selected window is opaque, rectangular, and not 52 // selected window, i.e. the selected window is opaque, rectangular, and not
52 // occluded. 53 // occluded.
(...skipping 12 matching lines...) Expand all
65 rtc::scoped_ptr<WindowCapturer> window_capturer_; 66 rtc::scoped_ptr<WindowCapturer> window_capturer_;
66 rtc::scoped_ptr<ScreenCapturer> screen_capturer_; 67 rtc::scoped_ptr<ScreenCapturer> screen_capturer_;
67 WindowId selected_window_; 68 WindowId selected_window_;
68 WindowId excluded_window_; 69 WindowId excluded_window_;
69 }; 70 };
70 71
71 } // namespace webrtc 72 } // namespace webrtc
72 73
73 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_CROPPING_WINDOW_CAPTURER_H_ 74 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_CROPPING_WINDOW_CAPTURER_H_
74 75
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/cropping_window_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698