diff options
Diffstat (limited to 'media/video')
8 files changed, 11 insertions, 13 deletions
diff --git a/media/video/capture/android/video_capture_device_android.cc b/media/video/capture/android/video_capture_device_android.cc index cbf5005..54ca9de 100644 --- a/media/video/capture/android/video_capture_device_android.cc +++ b/media/video/capture/android/video_capture_device_android.cc @@ -259,7 +259,7 @@ void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { base::AutoLock lock(lock_); state_ = kError; } - client_->OnError(reason); + client_->OnError(); } } // namespace media diff --git a/media/video/capture/linux/video_capture_device_linux.cc b/media/video/capture/linux/video_capture_device_linux.cc index 7155ae23..a6f85d5 100644 --- a/media/video/capture/linux/video_capture_device_linux.cc +++ b/media/video/capture/linux/video_capture_device_linux.cc @@ -607,7 +607,7 @@ void VideoCaptureDeviceLinux::SetErrorState(const std::string& reason) { v4l2_thread_.message_loop() == base::MessageLoop::current()); DVLOG(1) << reason; state_ = kError; - client_->OnError(reason); + client_->OnError(); } } // namespace media diff --git a/media/video/capture/mac/video_capture_device_mac.mm b/media/video/capture/mac/video_capture_device_mac.mm index 8ff066f..97e4363 100644 --- a/media/video/capture/mac/video_capture_device_mac.mm +++ b/media/video/capture/mac/video_capture_device_mac.mm @@ -322,7 +322,7 @@ void VideoCaptureDeviceMac::SetErrorState(const std::string& reason) { DCHECK(task_runner_->BelongsToCurrentThread()); DLOG(ERROR) << reason; state_ = kError; - client_->OnError(reason); + client_->OnError(); } bool VideoCaptureDeviceMac::UpdateCaptureResolution() { diff --git a/media/video/capture/video_capture_device.h b/media/video/capture/video_capture_device.h index a3cabad..c02dcc1 100644 --- a/media/video/capture/video_capture_device.h +++ b/media/video/capture/video_capture_device.h @@ -180,8 +180,8 @@ class MEDIA_EXPORT VideoCaptureDevice { int frame_rate) = 0; // An error has occurred that cannot be handled and VideoCaptureDevice must - // be StopAndDeAllocate()-ed. |reason| is a text description of the error. - virtual void OnError(const std::string& reason) = 0; + // be StopAndDeAllocate()-ed. + virtual void OnError() = 0; }; // Creates a VideoCaptureDevice object. diff --git a/media/video/capture/video_capture_device_unittest.cc b/media/video/capture/video_capture_device_unittest.cc index 735a96a..6a765e1 100644 --- a/media/video/capture/video_capture_device_unittest.cc +++ b/media/video/capture/video_capture_device_unittest.cc @@ -69,7 +69,7 @@ class MockClient : public media::VideoCaptureDevice::Client { explicit MockClient(base::Callback<void(const VideoCaptureFormat&)> frame_cb) : main_thread_(base::MessageLoopProxy::current()), frame_cb_(frame_cb) {} - virtual void OnError(const std::string& error_message) OVERRIDE { + virtual void OnError() OVERRIDE { OnErr(); } diff --git a/media/video/capture/win/video_capture_device_mf_win.cc b/media/video/capture/win/video_capture_device_mf_win.cc index de199c2..f4007fa 100644 --- a/media/video/capture/win/video_capture_device_mf_win.cc +++ b/media/video/capture/win/video_capture_device_mf_win.cc @@ -9,7 +9,6 @@ #include "base/lazy_instance.h" #include "base/memory/ref_counted.h" -#include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" #include "base/synchronization/waitable_event.h" #include "base/win/scoped_co_mem.h" @@ -433,10 +432,9 @@ void VideoCaptureDeviceMFWin::OnIncomingCapturedFrame( } void VideoCaptureDeviceMFWin::OnError(HRESULT hr) { - std::string log_msg = base::StringPrintf("VideoCaptureDeviceMFWin: %x", hr); - DLOG(ERROR) << log_msg; + DLOG(ERROR) << "VideoCaptureDeviceMFWin: " << std::hex << hr; if (client_.get()) - client_->OnError(log_msg); + client_->OnError(); } } // namespace media diff --git a/media/video/capture/win/video_capture_device_win.cc b/media/video/capture/win/video_capture_device_win.cc index 13d4d48..48dd3da 100644 --- a/media/video/capture/win/video_capture_device_win.cc +++ b/media/video/capture/win/video_capture_device_win.cc @@ -590,10 +590,10 @@ bool VideoCaptureDeviceWin::CreateCapabilityMap() { return !capabilities_.empty(); } -void VideoCaptureDeviceWin::SetErrorState(const std::string& reason) { +void VideoCaptureDeviceWin::SetErrorState(const char* reason) { DCHECK(CalledOnValidThread()); DVLOG(1) << reason; state_ = kError; - client_->OnError(reason); + client_->OnError(); } } // namespace media diff --git a/media/video/capture/win/video_capture_device_win.h b/media/video/capture/win/video_capture_device_win.h index 8c9e546..164c01c 100644 --- a/media/video/capture/win/video_capture_device_win.h +++ b/media/video/capture/win/video_capture_device_win.h @@ -59,7 +59,7 @@ class VideoCaptureDeviceWin virtual void FrameReceived(const uint8* buffer, int length); bool CreateCapabilityMap(); - void SetErrorState(const std::string& reason); + void SetErrorState(const char* reason); Name device_name_; InternalState state_; |