Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: remoting/protocol/webrtc_video_capturer_adapter.cc

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 7 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
8 8
9 namespace remoting { 9 namespace remoting {
10 10
11 // Number of frames to be captured per second. 11 // Number of frames to be captured per second.
12 const int kFramesPerSec = 30; 12 const int kFramesPerSec = 30;
13 13
14 WebrtcVideoCapturerAdapter::WebrtcVideoCapturerAdapter( 14 WebrtcVideoCapturerAdapter::WebrtcVideoCapturerAdapter(
15 scoped_ptr<webrtc::DesktopCapturer> capturer) 15 scoped_ptr<webrtc::DesktopCapturer> capturer)
16 : desktop_capturer_(capturer.Pass()) { 16 : desktop_capturer_(std::move(capturer)) {
17 DCHECK(desktop_capturer_); 17 DCHECK(desktop_capturer_);
18 18
19 thread_checker_.DetachFromThread(); 19 thread_checker_.DetachFromThread();
20 20
21 // Disable video adaptation since we don't intend to use it. 21 // Disable video adaptation since we don't intend to use it.
22 set_enable_video_adapter(false); 22 set_enable_video_adapter(false);
23 } 23 }
24 24
25 WebrtcVideoCapturerAdapter::~WebrtcVideoCapturerAdapter() { 25 WebrtcVideoCapturerAdapter::~WebrtcVideoCapturerAdapter() {
26 DCHECK(!capture_timer_); 26 DCHECK(!capture_timer_);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 void WebrtcVideoCapturerAdapter::CaptureNextFrame() { 187 void WebrtcVideoCapturerAdapter::CaptureNextFrame() {
188 // If we are paused, then don't capture. 188 // If we are paused, then don't capture.
189 if (!IsRunning()) 189 if (!IsRunning())
190 return; 190 return;
191 191
192 desktop_capturer_->Capture(webrtc::DesktopRegion()); 192 desktop_capturer_->Capture(webrtc::DesktopRegion());
193 } 193 }
194 194
195 } // namespace remoting 195 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698