| 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/base/mac/avfoundation_glue.h" | 5 #import "media/base/mac/avfoundation_glue.h" |
| 6 | 6 |
| 7 #import <AVFoundation/AVFoundation.h> | 7 #import <AVFoundation/AVFoundation.h> |
| 8 #include <dlfcn.h> | 8 #include <dlfcn.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 160 } |
| 161 | 161 |
| 162 Class AVFoundationGlue::AVCaptureSessionClass() { | 162 Class AVFoundationGlue::AVCaptureSessionClass() { |
| 163 return [AVFoundationBundle() classNamed:@"AVCaptureSession"]; | 163 return [AVFoundationBundle() classNamed:@"AVCaptureSession"]; |
| 164 } | 164 } |
| 165 | 165 |
| 166 Class AVFoundationGlue::AVCaptureVideoDataOutputClass() { | 166 Class AVFoundationGlue::AVCaptureVideoDataOutputClass() { |
| 167 return [AVFoundationBundle() classNamed:@"AVCaptureVideoDataOutput"]; | 167 return [AVFoundationBundle() classNamed:@"AVCaptureVideoDataOutput"]; |
| 168 } | 168 } |
| 169 | 169 |
| 170 Class AVFoundationGlue::AVCaptureStillImageOutputClass() { |
| 171 return [AVFoundationBundle() classNamed:@"AVCaptureStillImageOutput"]; |
| 172 } |
| 173 |
| 170 @implementation AVCaptureDeviceGlue | 174 @implementation AVCaptureDeviceGlue |
| 171 | 175 |
| 172 + (NSArray*)devices { | 176 + (NSArray*)devices { |
| 173 Class avcClass = | 177 Class avcClass = |
| 174 [AVFoundationGlue::AVFoundationBundle() classNamed:@"AVCaptureDevice"]; | 178 [AVFoundationGlue::AVFoundationBundle() classNamed:@"AVCaptureDevice"]; |
| 175 if ([avcClass respondsToSelector:@selector(devices)]) { | 179 if ([avcClass respondsToSelector:@selector(devices)]) { |
| 176 return [avcClass performSelector:@selector(devices)]; | 180 return [avcClass performSelector:@selector(devices)]; |
| 177 } | 181 } |
| 178 return nil; | 182 return nil; |
| 179 } | 183 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 190 @implementation AVCaptureDeviceInputGlue | 194 @implementation AVCaptureDeviceInputGlue |
| 191 | 195 |
| 192 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device | 196 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device |
| 193 error:(NSError**)outError { | 197 error:(NSError**)outError { |
| 194 return [[AVFoundationGlue::AVFoundationBundle() | 198 return [[AVFoundationGlue::AVFoundationBundle() |
| 195 classNamed:@"AVCaptureDeviceInput"] deviceInputWithDevice:device | 199 classNamed:@"AVCaptureDeviceInput"] deviceInputWithDevice:device |
| 196 error:outError]; | 200 error:outError]; |
| 197 } | 201 } |
| 198 | 202 |
| 199 @end // @implementation AVCaptureDeviceInputGlue | 203 @end // @implementation AVCaptureDeviceInputGlue |
| OLD | NEW |