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 30 matching lines...) Expand all Loading... |
41 // Since data can be read while another capture action is happening. | 41 // Since data can be read while another capture action is happening. |
42 class ScreenCapturer : public DesktopCapturer { | 42 class ScreenCapturer : public DesktopCapturer { |
43 public: | 43 public: |
44 // Use a struct to represent a screen although it has only an id for now, | 44 // Use a struct to represent a screen although it has only an id for now, |
45 // because we may want to add more fields (e.g. description) in the future. | 45 // because we may want to add more fields (e.g. description) in the future. |
46 struct Screen { | 46 struct Screen { |
47 ScreenId id; | 47 ScreenId id; |
48 }; | 48 }; |
49 typedef std::vector<Screen> ScreenList; | 49 typedef std::vector<Screen> ScreenList; |
50 | 50 |
51 virtual ~ScreenCapturer() {} | 51 ~ScreenCapturer() override {} |
52 | 52 |
53 // Creates a platform-specific capturer. | 53 // Creates a platform-specific capturer. |
54 static ScreenCapturer* Create(const DesktopCaptureOptions& options); | 54 static ScreenCapturer* Create(const DesktopCaptureOptions& options); |
55 | 55 |
56 // Get the list of screens (not containing kFullDesktopScreenId). Returns | 56 // Get the list of screens (not containing kFullDesktopScreenId). Returns |
57 // false in case of a failure. | 57 // false in case of a failure. |
58 virtual bool GetScreenList(ScreenList* screens) = 0; | 58 virtual bool GetScreenList(ScreenList* screens) = 0; |
59 | 59 |
60 // Select the screen to be captured. Returns false in case of a failure (e.g. | 60 // Select the screen to be captured. Returns false in case of a failure (e.g. |
61 // if there is no screen with the specified id). If this is never called, the | 61 // if there is no screen with the specified id). If this is never called, the |
62 // full desktop is captured. | 62 // full desktop is captured. |
63 virtual bool SelectScreen(ScreenId id) = 0; | 63 virtual bool SelectScreen(ScreenId id) = 0; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace webrtc | 66 } // namespace webrtc |
67 | 67 |
68 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_H_ | 68 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_H_ |
OLD | NEW |