OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_avfoundation_mac.h" | 5 #import "media/capture/video/mac/video_capture_device_avfoundation_mac.h" |
6 | 6 |
7 #import <CoreVideo/CoreVideo.h> | 7 #import <CoreVideo/CoreVideo.h> |
8 | 8 |
| 9 #include "base/location.h" |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/mac/foundation_util.h" | 11 #include "base/mac/foundation_util.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 "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
14 | 15 |
15 // Prefer MJPEG if frame width or height is larger than this. | 16 // Prefer MJPEG if frame width or height is larger than this. |
16 static const int kMjpegWidthThreshold = 640; | 17 static const int kMjpegWidthThreshold = 640; |
17 static const int kMjpegHeightThreshold = 480; | 18 static const int kMjpegHeightThreshold = 480; |
18 | 19 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 [self sendErrorString:[NSString | 345 [self sendErrorString:[NSString |
345 stringWithFormat:@"%@: %@", | 346 stringWithFormat:@"%@: %@", |
346 [error localizedDescription], | 347 [error localizedDescription], |
347 [error localizedFailureReason]]]; | 348 [error localizedFailureReason]]]; |
348 } | 349 } |
349 | 350 |
350 - (void)sendErrorString:(NSString*)error { | 351 - (void)sendErrorString:(NSString*)error { |
351 DLOG(ERROR) << [error UTF8String]; | 352 DLOG(ERROR) << [error UTF8String]; |
352 base::AutoLock lock(lock_); | 353 base::AutoLock lock(lock_); |
353 if (frameReceiver_) | 354 if (frameReceiver_) |
354 frameReceiver_->ReceiveError([error UTF8String]); | 355 frameReceiver_->ReceiveError(FROM_HERE, [error UTF8String]); |
355 } | 356 } |
356 | 357 |
357 @end | 358 @end |
OLD | NEW |