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..3ad0d45c2819e9e6ea153a97f55acd3a815f2391 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) |
+ LogMessage("Using AVFoundation for device: " + device_name_.name()); |
+ else |
+ LogMessage("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::LogMessage(const std::string& message) { |
+ 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() |