| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "media/capture/video/mac/video_capture_device_qtkit_mac.h" | 5 #import "media/capture/video/mac/video_capture_device_qtkit_mac.h" |
| 6 | 6 |
| 7 #import <QTKit/QTKit.h> | 7 #import <QTKit/QTKit.h> |
| 8 | 8 |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/location.h" |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "media/base/video_capture_types.h" | 12 #include "media/base/video_capture_types.h" |
| 12 #include "media/capture/video/mac/video_capture_device_mac.h" | 13 #include "media/capture/video/mac/video_capture_device_mac.h" |
| 13 #include "media/capture/video/video_capture_device.h" | 14 #include "media/capture/video/video_capture_device.h" |
| 14 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
| 15 | 16 |
| 16 @implementation VideoCaptureDeviceQTKit | 17 @implementation VideoCaptureDeviceQTKit |
| 17 | 18 |
| 18 #pragma mark Class methods | 19 #pragma mark Class methods |
| 19 | 20 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 [[errorNotification userInfo] objectForKey:QTCaptureSessionErrorKey]; | 339 [[errorNotification userInfo] objectForKey:QTCaptureSessionErrorKey]; |
| 339 [self sendErrorString: | 340 [self sendErrorString: |
| 340 [NSString stringWithFormat:@"%@: %@", [error localizedDescription], | 341 [NSString stringWithFormat:@"%@: %@", [error localizedDescription], |
| 341 [error localizedFailureReason]]]; | 342 [error localizedFailureReason]]]; |
| 342 } | 343 } |
| 343 | 344 |
| 344 - (void)sendErrorString:(NSString*)error { | 345 - (void)sendErrorString:(NSString*)error { |
| 345 DLOG(ERROR) << [error UTF8String]; | 346 DLOG(ERROR) << [error UTF8String]; |
| 346 [lock_ lock]; | 347 [lock_ lock]; |
| 347 if (frameReceiver_) | 348 if (frameReceiver_) |
| 348 frameReceiver_->ReceiveError([error UTF8String]); | 349 frameReceiver_->ReceiveError(FROM_HERE, [error UTF8String]); |
| 349 [lock_ unlock]; | 350 [lock_ unlock]; |
| 350 } | 351 } |
| 351 | 352 |
| 352 - (void)sendLogString:(NSString*)message { | 353 - (void)sendLogString:(NSString*)message { |
| 353 DVLOG(1) << [message UTF8String]; | 354 DVLOG(1) << [message UTF8String]; |
| 354 [lock_ lock]; | 355 [lock_ lock]; |
| 355 if (frameReceiver_) | 356 if (frameReceiver_) |
| 356 frameReceiver_->LogMessage([message UTF8String]); | 357 frameReceiver_->LogMessage([message UTF8String]); |
| 357 [lock_ unlock]; | 358 [lock_ unlock]; |
| 358 } | 359 } |
| 359 | 360 |
| 360 @end | 361 @end |
| OLD | NEW |