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/video/capture/mac/video_capture_device_avfoundation_mac.h" | 5 #import "media/video/capture/mac/video_capture_device_avfoundation_mac.h" |
6 | 6 |
7 #import <CoreVideo/CoreVideo.h> | 7 #import <CoreVideo/CoreVideo.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
11 #include "media/video/capture/mac/video_capture_device_mac.h" | 11 #include "media/video/capture/mac/video_capture_device_mac.h" |
12 #include "ui/gfx/size.h" | 12 #include "ui/gfx/geometry/size.h" |
13 | 13 |
14 @implementation VideoCaptureDeviceAVFoundation | 14 @implementation VideoCaptureDeviceAVFoundation |
15 | 15 |
16 #pragma mark Class methods | 16 #pragma mark Class methods |
17 | 17 |
18 + (void)getDeviceNames:(NSMutableDictionary*)deviceNames { | 18 + (void)getDeviceNames:(NSMutableDictionary*)deviceNames { |
19 // At this stage we already know that AVFoundation is supported and the whole | 19 // At this stage we already know that AVFoundation is supported and the whole |
20 // library is loaded and initialised, by the device monitoring. | 20 // library is loaded and initialised, by the device monitoring. |
21 NSArray* devices = [AVCaptureDeviceGlue devices]; | 21 NSArray* devices = [AVCaptureDeviceGlue devices]; |
22 for (CrAVCaptureDevice* device in devices) { | 22 for (CrAVCaptureDevice* device in devices) { |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 292 } |
293 | 293 |
294 - (void)sendErrorString:(NSString*)error { | 294 - (void)sendErrorString:(NSString*)error { |
295 DLOG(ERROR) << [error UTF8String]; | 295 DLOG(ERROR) << [error UTF8String]; |
296 base::AutoLock lock(lock_); | 296 base::AutoLock lock(lock_); |
297 if (frameReceiver_) | 297 if (frameReceiver_) |
298 frameReceiver_->ReceiveError([error UTF8String]); | 298 frameReceiver_->ReceiveError([error UTF8String]); |
299 } | 299 } |
300 | 300 |
301 @end | 301 @end |
OLD | NEW |