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 15 matching lines...) Expand all Loading... |
26 class DesktopCapturer { | 26 class DesktopCapturer { |
27 public: | 27 public: |
28 // Interface that must be implemented by the DesktopCapturer consumers. | 28 // Interface that must be implemented by the DesktopCapturer consumers. |
29 class Callback { | 29 class Callback { |
30 public: | 30 public: |
31 // Deprecated. | 31 // Deprecated. |
32 // TODO(sergeyu): Remove this method once all references to it are removed | 32 // TODO(sergeyu): Remove this method once all references to it are removed |
33 // from chromium. | 33 // from chromium. |
34 virtual SharedMemory* CreateSharedMemory(size_t size) { return nullptr; } | 34 virtual SharedMemory* CreateSharedMemory(size_t size) { return nullptr; } |
35 | 35 |
36 // Called to notify that the capturer has failed to initialize. | |
37 virtual void OnInitializationFailed() {}; | |
38 | |
39 // Called after a frame has been captured. Handler must take ownership of | 36 // Called after a frame has been captured. Handler must take ownership of |
40 // |frame|. If capture has failed for any reason |frame| is set to NULL | 37 // |frame|. If capture has failed for any reason |frame| is set to NULL |
41 // (e.g. the window has been closed). | 38 // (e.g. the window has been closed). |
42 virtual void OnCaptureCompleted(DesktopFrame* frame) = 0; | 39 virtual void OnCaptureCompleted(DesktopFrame* frame) = 0; |
43 | 40 |
44 protected: | 41 protected: |
45 virtual ~Callback() {} | 42 virtual ~Callback() {} |
46 }; | 43 }; |
47 | 44 |
48 virtual ~DesktopCapturer() {} | 45 virtual ~DesktopCapturer() {} |
(...skipping 20 matching lines...) Expand all Loading... |
69 // Sets the window to be excluded from the captured image in the future | 66 // Sets the window to be excluded from the captured image in the future |
70 // Capture calls. Used to exclude the screenshare notification window for | 67 // Capture calls. Used to exclude the screenshare notification window for |
71 // screen capturing. | 68 // screen capturing. |
72 virtual void SetExcludedWindow(WindowId window) {} | 69 virtual void SetExcludedWindow(WindowId window) {} |
73 }; | 70 }; |
74 | 71 |
75 } // namespace webrtc | 72 } // namespace webrtc |
76 | 73 |
77 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ | 74 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ |
78 | 75 |
OLD | NEW |