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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 11146008: remove VideoDeviceError and AudioDeviceError for media stream. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
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 #include "content/browser/renderer_host/media/video_capture_controller.h" 5 #include "content/browser/renderer_host/media/video_capture_controller.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 default: 331 default:
332 NOTREACHED(); 332 NOTREACHED();
333 } 333 }
334 334
335 BrowserThread::PostTask(BrowserThread::IO, 335 BrowserThread::PostTask(BrowserThread::IO,
336 FROM_HERE, 336 FROM_HERE,
337 base::Bind(&VideoCaptureController::DoIncomingCapturedFrameOnIOThread, 337 base::Bind(&VideoCaptureController::DoIncomingCapturedFrameOnIOThread,
338 this, buffer_id, timestamp)); 338 this, buffer_id, timestamp));
339 } 339 }
340 340
341 // TODO(perkj): Need to decide if the error should be sent to
342 // |video_capture_manager_| or if it enough to tell the
343 // VideoCaptureMessageFilter in the render process that the device failed.
344 void VideoCaptureController::OnError() { 341 void VideoCaptureController::OnError() {
345 BrowserThread::PostTask(BrowserThread::IO, 342 BrowserThread::PostTask(BrowserThread::IO,
346 FROM_HERE, 343 FROM_HERE,
347 base::Bind(&VideoCaptureController::DoErrorOnIOThread, this)); 344 base::Bind(&VideoCaptureController::DoErrorOnIOThread, this));
348 } 345 }
349 346
350 void VideoCaptureController::OnFrameInfo( 347 void VideoCaptureController::OnFrameInfo(
351 const media::VideoCaptureCapability& info) { 348 const media::VideoCaptureCapability& info) {
352 frame_info_= info; 349 frame_info_= info;
353 // Handle cases when |info| has odd numbers for width/height. 350 // Handle cases when |info| has odd numbers for width/height.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 bool VideoCaptureController::ClientHasDIB() { 570 bool VideoCaptureController::ClientHasDIB() {
574 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 571 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
575 base::AutoLock lock(lock_); 572 base::AutoLock lock(lock_);
576 for (DIBMap::iterator dib_it = owned_dibs_.begin(); 573 for (DIBMap::iterator dib_it = owned_dibs_.begin();
577 dib_it != owned_dibs_.end(); dib_it++) { 574 dib_it != owned_dibs_.end(); dib_it++) {
578 if (dib_it->second->references > 0) 575 if (dib_it->second->references > 0)
579 return true; 576 return true;
580 } 577 }
581 return false; 578 return false;
582 } 579 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698