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 |
11 #include "webrtc/modules/desktop_capture/window_capturer.h" | |
12 | |
13 #include <assert.h> | 11 #include <assert.h> |
14 | 12 |
15 #include "webrtc/base/constructormagic.h" | 13 #include "webrtc/base/constructormagic.h" |
| 14 #include "webrtc/modules/desktop_capture/desktop_capturer.h" |
16 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 15 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
17 | 16 |
18 namespace webrtc { | 17 namespace webrtc { |
19 | 18 |
20 namespace { | 19 namespace { |
21 | 20 |
22 class WindowCapturerNull : public WindowCapturer { | 21 class WindowCapturerNull : public DesktopCapturer { |
23 public: | 22 public: |
24 WindowCapturerNull(); | 23 WindowCapturerNull(); |
25 ~WindowCapturerNull() override; | 24 ~WindowCapturerNull() override; |
26 | 25 |
27 // DesktopCapturer interface. | 26 // DesktopCapturer interface. |
28 void Start(Callback* callback) override; | 27 void Start(Callback* callback) override; |
29 void CaptureFrame() override; | 28 void CaptureFrame() override; |
30 bool GetSourceList(SourceList* sources) override; | 29 bool GetSourceList(SourceList* sources) override; |
31 bool SelectSource(SourceId id) override; | 30 bool SelectSource(SourceId id) override; |
32 | 31 |
(...skipping 24 matching lines...) Expand all Loading... |
57 } | 56 } |
58 | 57 |
59 void WindowCapturerNull::CaptureFrame() { | 58 void WindowCapturerNull::CaptureFrame() { |
60 // Not implemented yet. | 59 // Not implemented yet. |
61 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); | 60 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); |
62 } | 61 } |
63 | 62 |
64 } // namespace | 63 } // namespace |
65 | 64 |
66 // static | 65 // static |
67 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { | |
68 return new WindowCapturerNull(); | |
69 } | |
70 | |
71 // static | |
72 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer( | 66 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer( |
73 const DesktopCaptureOptions& options) { | 67 const DesktopCaptureOptions& options) { |
74 return std::unique_ptr<DesktopCapturer>(new WindowCapturerNull()); | 68 return std::unique_ptr<DesktopCapturer>(new WindowCapturerNull()); |
75 } | 69 } |
76 | 70 |
77 } // namespace webrtc | 71 } // namespace webrtc |
OLD | NEW |