| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/protocol/webrtc_video_capturer_adapter.h" | 5 #include "remoting/protocol/webrtc_video_capturer_adapter.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
| 8 | 10 |
| 9 namespace remoting { | 11 namespace remoting { |
| 10 | 12 |
| 11 // Number of frames to be captured per second. | 13 // Number of frames to be captured per second. |
| 12 const int kFramesPerSec = 30; | 14 const int kFramesPerSec = 30; |
| 13 | 15 |
| 14 WebrtcVideoCapturerAdapter::WebrtcVideoCapturerAdapter( | 16 WebrtcVideoCapturerAdapter::WebrtcVideoCapturerAdapter( |
| 15 scoped_ptr<webrtc::DesktopCapturer> capturer) | 17 scoped_ptr<webrtc::DesktopCapturer> capturer) |
| 16 : desktop_capturer_(std::move(capturer)) { | 18 : desktop_capturer_(std::move(capturer)) { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 189 |
| 188 void WebrtcVideoCapturerAdapter::CaptureNextFrame() { | 190 void WebrtcVideoCapturerAdapter::CaptureNextFrame() { |
| 189 // If we are paused, then don't capture. | 191 // If we are paused, then don't capture. |
| 190 if (!IsRunning()) | 192 if (!IsRunning()) |
| 191 return; | 193 return; |
| 192 | 194 |
| 193 desktop_capturer_->Capture(webrtc::DesktopRegion()); | 195 desktop_capturer_->Capture(webrtc::DesktopRegion()); |
| 194 } | 196 } |
| 195 | 197 |
| 196 } // namespace remoting | 198 } // namespace remoting |
| OLD | NEW |