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

Side by Side Diff: media/base/mac/avfoundation_glue.mm

Issue 2146973002: RELAND: ImageCapture: Implement takePhoto() for Mac AVFoundation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a [captureSession_ canAddOutput:stillImageOutput_] guard Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « media/base/mac/avfoundation_glue.h ('k') | media/base/mac/coremedia_glue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/base/mac/avfoundation_glue.h ('k') | media/base/mac/coremedia_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698