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 19 matching lines...) Expand all Loading... |
30 // The frame was captured successfully. | 30 // The frame was captured successfully. |
31 SUCCESS, | 31 SUCCESS, |
32 | 32 |
33 // There was a temporary error. The caller should continue calling | 33 // There was a temporary error. The caller should continue calling |
34 // Capture(), in the expectation that it will eventually recover. | 34 // Capture(), in the expectation that it will eventually recover. |
35 ERROR_TEMPORARY, | 35 ERROR_TEMPORARY, |
36 | 36 |
37 // Capture has failed and will keep failing if the caller tries calling | 37 // Capture has failed and will keep failing if the caller tries calling |
38 // Capture() again. | 38 // Capture() again. |
39 ERROR_PERMANENT, | 39 ERROR_PERMANENT, |
| 40 |
| 41 MAX_VALUE = ERROR_PERMANENT |
40 }; | 42 }; |
41 | 43 |
42 // Interface that must be implemented by the DesktopCapturer consumers. | 44 // Interface that must be implemented by the DesktopCapturer consumers. |
43 class Callback { | 45 class Callback { |
44 public: | 46 public: |
45 // Called after a frame has been captured. |frame| is not nullptr if and | 47 // Called after a frame has been captured. |frame| is not nullptr if and |
46 // only if |result| is SUCCESS. | 48 // only if |result| is SUCCESS. |
47 virtual void OnCaptureResult(Result result, | 49 virtual void OnCaptureResult(Result result, |
48 std::unique_ptr<DesktopFrame> frame) { | 50 std::unique_ptr<DesktopFrame> frame) { |
49 OnCaptureCompleted(frame.release()); | 51 OnCaptureCompleted(frame.release()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Sets the window to be excluded from the captured image in the future | 85 // Sets the window to be excluded from the captured image in the future |
84 // Capture calls. Used to exclude the screenshare notification window for | 86 // Capture calls. Used to exclude the screenshare notification window for |
85 // screen capturing. | 87 // screen capturing. |
86 virtual void SetExcludedWindow(WindowId window) {} | 88 virtual void SetExcludedWindow(WindowId window) {} |
87 }; | 89 }; |
88 | 90 |
89 } // namespace webrtc | 91 } // namespace webrtc |
90 | 92 |
91 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ | 93 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ |
92 | 94 |
OLD | NEW |