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

Unified Diff: media/video/capture/mac/video_capture_device_mac.mm

Issue 308813002: Mac Video Capture: Connect error logging to WebRTC Log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: media/video/capture/mac/video_capture_device_mac.mm
diff --git a/media/video/capture/mac/video_capture_device_mac.mm b/media/video/capture/mac/video_capture_device_mac.mm
index fb477190f9a73cf9516d8e92e166d7135585ef4e..9779158a0a017507d462a9f2153cef0f00fda45c 100644
--- a/media/video/capture/mac/video_capture_device_mac.mm
+++ b/media/video/capture/mac/video_capture_device_mac.mm
@@ -378,6 +378,10 @@ void VideoCaptureDeviceMac::AllocateAndStart(
GetBestMatchSupportedResolution(&width, &height);
client_ = client.Pass();
+ if (device_name_.capture_api_type() == Name::AVFOUNDATION)
+ SendSystemLog("Using AVFoundation for device: " + device_name_.name());
Henrik Grunell 2014/05/30 11:48:32 Just to confirm: device_name_.name() is a user fri
mcasas 2014/05/30 12:15:27 Yes, is the camera user friendly name, with the ve
+ else
+ SendSystemLog("Using QTKit for device: " + device_name_.name());
NSString* deviceId =
[NSString stringWithUTF8String:device_name_.id().c_str()];
@@ -560,6 +564,12 @@ void VideoCaptureDeviceMac::SetErrorState(const std::string& reason) {
client_->OnError(reason);
}
+void VideoCaptureDeviceMac::SendSystemLog(const std::string& message) {
Henrik Grunell 2014/05/30 11:48:32 Unclear to me why it's called SendSystemLog. Can y
mcasas 2014/05/30 12:15:27 Renamed to a more simpler name.
+ DCHECK(task_runner_->BelongsToCurrentThread());
+ if (client_)
+ client_->OnLog(message);
+}
+
bool VideoCaptureDeviceMac::UpdateCaptureResolution() {
if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height()
width:capture_format_.frame_size.width()

Powered by Google App Engine
This is Rietveld 408576698