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

Side by Side Diff: remoting/host/cast_video_capturer_adapter.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/cast_video_capturer_adapter.h" 5 #include "remoting/host/cast_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
(...skipping 10 matching lines...) Expand all
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 CastVideoCapturerAdapter::~CastVideoCapturerAdapter() { 25 CastVideoCapturerAdapter::~CastVideoCapturerAdapter() {
26 DCHECK(!capture_timer_); 26 DCHECK(!capture_timer_);
27 } 27 }
28 28
29 webrtc::SharedMemory* CastVideoCapturerAdapter::CreateSharedMemory( 29 webrtc::SharedMemory* CastVideoCapturerAdapter::CreateSharedMemory(
30 size_t size) { 30 size_t size) {
31 return NULL; 31 return nullptr;
32 } 32 }
33 33
34 void CastVideoCapturerAdapter::OnCaptureCompleted(webrtc::DesktopFrame* frame) { 34 void CastVideoCapturerAdapter::OnCaptureCompleted(webrtc::DesktopFrame* frame) {
35 scoped_ptr<webrtc::DesktopFrame> owned_frame(frame); 35 scoped_ptr<webrtc::DesktopFrame> owned_frame(frame);
36 36
37 // Drop the owned_frame if there were no changes. 37 // Drop the owned_frame if there were no changes.
38 if (!owned_frame || owned_frame->updated_region().is_empty()) { 38 if (!owned_frame || owned_frame->updated_region().is_empty()) {
39 owned_frame.reset(); 39 owned_frame.reset();
40 return; 40 return;
41 } 41 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 return true; 157 return true;
158 } 158 }
159 159
160 void CastVideoCapturerAdapter::Stop() { 160 void CastVideoCapturerAdapter::Stop() {
161 DCHECK(thread_checker_.CalledOnValidThread()); 161 DCHECK(thread_checker_.CalledOnValidThread());
162 DCHECK_NE(capture_state(), cricket::CS_STOPPED); 162 DCHECK_NE(capture_state(), cricket::CS_STOPPED);
163 163
164 capture_timer_.reset(); 164 capture_timer_.reset();
165 165
166 SetCaptureFormat(NULL); 166 SetCaptureFormat(nullptr);
167 SetCaptureState(cricket::CS_STOPPED); 167 SetCaptureState(cricket::CS_STOPPED);
168 168
169 VLOG(1) << "CastVideoCapturerAdapter stopped."; 169 VLOG(1) << "CastVideoCapturerAdapter stopped.";
170 } 170 }
171 171
172 172
173 bool CastVideoCapturerAdapter::IsRunning() { 173 bool CastVideoCapturerAdapter::IsRunning() {
174 DCHECK(thread_checker_.CalledOnValidThread()); 174 DCHECK(thread_checker_.CalledOnValidThread());
175 175
176 return capture_timer_->IsRunning(); 176 return capture_timer_->IsRunning();
(...skipping 15 matching lines...) Expand all
192 void CastVideoCapturerAdapter::CaptureNextFrame() { 192 void CastVideoCapturerAdapter::CaptureNextFrame() {
193 // If we are paused, then don't capture. 193 // If we are paused, then don't capture.
194 if (!IsRunning()) 194 if (!IsRunning())
195 return; 195 return;
196 196
197 desktop_capturer_->Capture(webrtc::DesktopRegion()); 197 desktop_capturer_->Capture(webrtc::DesktopRegion());
198 } 198 }
199 199
200 } // namespace remoting 200 } // namespace remoting
201 201
OLDNEW
« no previous file with comments | « remoting/host/cast_extension_session.cc ('k') | remoting/host/chromeos/aura_desktop_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698