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

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: grunell@ second round of comments. 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..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()
« no previous file with comments | « media/video/capture/mac/video_capture_device_mac.h ('k') | media/video/capture/mac/video_capture_device_qtkit_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698