OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/ipc_video_frame_capturer.h" | 5 #include "remoting/host/ipc_video_frame_capturer.h" |
6 | 6 |
7 #include "remoting/host/desktop_session_proxy.h" | 7 #include "remoting/host/desktop_session_proxy.h" |
8 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 8 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
(...skipping 23 matching lines...) Expand all Loading... | |
34 } | 34 } |
35 | 35 |
36 void IpcVideoFrameCapturer::OnCaptureResult( | 36 void IpcVideoFrameCapturer::OnCaptureResult( |
37 webrtc::DesktopCapturer::Result result, | 37 webrtc::DesktopCapturer::Result result, |
38 std::unique_ptr<webrtc::DesktopFrame> frame) { | 38 std::unique_ptr<webrtc::DesktopFrame> frame) { |
39 DCHECK(capture_pending_); | 39 DCHECK(capture_pending_); |
40 capture_pending_ = false; | 40 capture_pending_ = false; |
41 callback_->OnCaptureResult(result, std::move(frame)); | 41 callback_->OnCaptureResult(result, std::move(frame)); |
42 } | 42 } |
43 | 43 |
44 bool IpcVideoFrameCapturer::GetSourceList(SourceList* sources) { | |
45 return desktop_session_proxy_->GetSourceList(sources); | |
Sergey Ulanov
2016/11/05 00:16:26
Problem here is that the API is synchronous, but a
Hzj_jie
2016/11/06 04:27:24
Yes, that's the reason I put the TODO in DesktopSe
| |
46 } | |
47 | |
48 bool IpcVideoFrameCapturer::SelectSource(SourceId id) { | |
49 return desktop_session_proxy_->SelectSource(id); | |
50 } | |
51 | |
44 } // namespace remoting | 52 } // namespace remoting |
OLD | NEW |