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

Side by Side Diff: content/renderer/media/video_capture_impl.cc

Issue 480233007: Remove implicit conversions from scoped_refptr to T* in content/renderer/media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 (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 // Notes about usage of this object by VideoCaptureImplManager. 5 // Notes about usage of this object by VideoCaptureImplManager.
6 // 6 //
7 // VideoCaptureImplManager access this object by using a Unretained() 7 // VideoCaptureImplManager access this object by using a Unretained()
8 // binding and tasks on the IO thread. It is then important that 8 // binding and tasks on the IO thread. It is then important that
9 // VideoCaptureImpl never post task to itself. All operations must be 9 // VideoCaptureImpl never post task to itself. All operations must be
10 // synchronous. 10 // synchronous.
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 DCHECK(inserted); 192 DCHECK(inserted);
193 } 193 }
194 194
195 void VideoCaptureImpl::OnBufferDestroyed(int buffer_id) { 195 void VideoCaptureImpl::OnBufferDestroyed(int buffer_id) {
196 DCHECK(thread_checker_.CalledOnValidThread()); 196 DCHECK(thread_checker_.CalledOnValidThread());
197 197
198 ClientBufferMap::iterator iter = client_buffers_.find(buffer_id); 198 ClientBufferMap::iterator iter = client_buffers_.find(buffer_id);
199 if (iter == client_buffers_.end()) 199 if (iter == client_buffers_.end())
200 return; 200 return;
201 201
202 DCHECK(!iter->second || iter->second->HasOneRef()) 202 DCHECK(!iter->second.get() || iter->second->HasOneRef())
203 << "Instructed to delete buffer we are still using."; 203 << "Instructed to delete buffer we are still using.";
204 client_buffers_.erase(iter); 204 client_buffers_.erase(iter);
205 } 205 }
206 206
207 void VideoCaptureImpl::OnBufferReceived(int buffer_id, 207 void VideoCaptureImpl::OnBufferReceived(int buffer_id,
208 const media::VideoCaptureFormat& format, 208 const media::VideoCaptureFormat& format,
209 base::TimeTicks timestamp) { 209 base::TimeTicks timestamp) {
210 DCHECK(thread_checker_.CalledOnValidThread()); 210 DCHECK(thread_checker_.CalledOnValidThread());
211 211
212 // The capture pipeline supports only I420 for now. 212 // The capture pipeline supports only I420 for now.
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 ClientInfoMap::iterator it = clients->find(client_id); 433 ClientInfoMap::iterator it = clients->find(client_id);
434 if (it != clients->end()) { 434 if (it != clients->end()) {
435 it->second.state_update_cb.Run(VIDEO_CAPTURE_STATE_STOPPED); 435 it->second.state_update_cb.Run(VIDEO_CAPTURE_STATE_STOPPED);
436 clients->erase(it); 436 clients->erase(it);
437 found = true; 437 found = true;
438 } 438 }
439 return found; 439 return found;
440 } 440 }
441 441
442 } // namespace content 442 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_encoder.cc ('k') | content/renderer/media/video_frame_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698