diff options
author | vrk@chromium.org <vrk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 00:55:43 +0000 |
---|---|---|
committer | vrk@chromium.org <vrk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 00:55:43 +0000 |
commit | d95595eb5145e310baf692f359f9488faf73750d (patch) | |
tree | 41e2e610d8c3856acf1f747891509dcd12abbd65 /content/browser/renderer_host/media/video_capture_device_impl.cc | |
parent | b3c1b3b66d1c720172e731d1bfc44cfb44c992a3 (diff) | |
download | chromium_src-d95595eb5145e310baf692f359f9488faf73750d.zip chromium_src-d95595eb5145e310baf692f359f9488faf73750d.tar.gz chromium_src-d95595eb5145e310baf692f359f9488faf73750d.tar.bz2 |
Revert 247164 "Implement browser-side logging to WebRtc log"
Need to revert this because it's causing crashes on Canary.
BUG=338848
> Implement browser-side logging to WebRtc log
>
> This adds a logging callback to RenderProcessHost and also adds logging
> for device enumeration in the browser process.
>
> BUG=332261
>
> Review URL: https://codereview.chromium.org/140843007
TBR=vrk@chromium.org
Review URL: https://codereview.chromium.org/132233058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/media/video_capture_device_impl.cc')
-rw-r--r-- | content/browser/renderer_host/media/video_capture_device_impl.cc | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/content/browser/renderer_host/media/video_capture_device_impl.cc b/content/browser/renderer_host/media/video_capture_device_impl.cc index 88e5ab5..045eda6 100644 --- a/content/browser/renderer_host/media/video_capture_device_impl.cc +++ b/content/browser/renderer_host/media/video_capture_device_impl.cc @@ -155,10 +155,10 @@ void ThreadSafeCaptureOracle::Stop() { client_.reset(); } -void ThreadSafeCaptureOracle::ReportError(const std::string& reason) { +void ThreadSafeCaptureOracle::ReportError() { base::AutoLock guard(lock_); if (client_) - client_->OnError(reason); + client_->OnError(); } void ThreadSafeCaptureOracle::DidCaptureFrame( @@ -196,19 +196,16 @@ void VideoCaptureDeviceImpl::AllocateAndStart( } if (params.requested_format.frame_rate <= 0) { - std::string error_msg = base::StringPrintf( - "invalid frame_rate: %d", params.requested_format.frame_rate); - DVLOG(1) << error_msg; - client->OnError(error_msg); + DVLOG(1) << "invalid frame_rate: " << params.requested_format.frame_rate; + client->OnError(); return; } if (params.requested_format.frame_size.width() < kMinFrameWidth || params.requested_format.frame_size.height() < kMinFrameHeight) { - std::string error_msg = - "invalid frame size: " + params.requested_format.frame_size.ToString(); - DVLOG(1) << error_msg; - client->OnError(error_msg); + DVLOG(1) << "invalid frame size: " + << params.requested_format.frame_size.ToString(); + client->OnError(); return; } @@ -255,9 +252,8 @@ void VideoCaptureDeviceImpl::StopAndDeAllocate() { void VideoCaptureDeviceImpl::CaptureStarted(bool success) { DCHECK(thread_checker_.CalledOnValidThread()); if (!success) { - std::string reason("Failed to start capture machine."); - DVLOG(1) << reason; - Error(reason); + DVLOG(1) << "Failed to start capture machine."; + Error(); } } @@ -295,14 +291,14 @@ void VideoCaptureDeviceImpl::TransitionStateTo(State next_state) { state_ = next_state; } -void VideoCaptureDeviceImpl::Error(const std::string& reason) { +void VideoCaptureDeviceImpl::Error() { DCHECK(thread_checker_.CalledOnValidThread()); if (state_ == kIdle) return; if (oracle_proxy_) - oracle_proxy_->ReportError(reason); + oracle_proxy_->ReportError(); StopAndDeAllocate(); TransitionStateTo(kError); |