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

Side by Side Diff: remoting/host/video_frame_recorder.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
« no previous file with comments | « remoting/host/verify_config_window_win.cc ('k') | remoting/host/video_scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/video_frame_recorder.h" 5 #include "remoting/host/video_frame_recorder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 content_bytes_ = 0; 153 content_bytes_ = 0;
154 154
155 // Tell the wrapper to stop recording and posting frames to us. 155 // Tell the wrapper to stop recording and posting frames to us.
156 if (encoder_task_runner_.get()) { 156 if (encoder_task_runner_.get()) {
157 encoder_task_runner_->PostTask(FROM_HERE, 157 encoder_task_runner_->PostTask(FROM_HERE,
158 base::Bind(&RecordingVideoEncoder::set_enable_recording, 158 base::Bind(&RecordingVideoEncoder::set_enable_recording,
159 recording_encoder_, false)); 159 recording_encoder_, false));
160 } 160 }
161 161
162 // Detach this recorder from the calling and encode threads. 162 // Detach this recorder from the calling and encode threads.
163 caller_task_runner_ = NULL; 163 caller_task_runner_ = nullptr;
164 encoder_task_runner_ = NULL; 164 encoder_task_runner_ = nullptr;
165 } 165 }
166 166
167 void VideoFrameRecorder::SetEnableRecording(bool enable_recording) { 167 void VideoFrameRecorder::SetEnableRecording(bool enable_recording) {
168 DCHECK(!caller_task_runner_.get() || 168 DCHECK(!caller_task_runner_.get() ||
169 caller_task_runner_->BelongsToCurrentThread()); 169 caller_task_runner_->BelongsToCurrentThread());
170 170
171 if (enable_recording_ == enable_recording) { 171 if (enable_recording_ == enable_recording) {
172 return; 172 return;
173 } 173 }
174 enable_recording_ = enable_recording; 174 enable_recording_ = enable_recording;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (content_bytes_ + frame_bytes > max_content_bytes_) { 239 if (content_bytes_ + frame_bytes > max_content_bytes_) {
240 return; 240 return;
241 } 241 }
242 242
243 // Store the frame and update the content byte count. 243 // Store the frame and update the content byte count.
244 recorded_frames_.push_back(frame.release()); 244 recorded_frames_.push_back(frame.release());
245 content_bytes_ += frame_bytes; 245 content_bytes_ += frame_bytes;
246 } 246 }
247 247
248 } // namespace remoting 248 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/verify_config_window_win.cc ('k') | remoting/host/video_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698