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

Side by Side Diff: media/video/capture/mac/avfoundation_glue.h

Issue 258783007: Mac AVFoundation: Allow use of all camera's supported resolutions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bemasc@ nit Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/video/capture/mac/avfoundation_glue.mm » ('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 // AVFoundation API is only introduced in Mac OS X > 10.6, and there is only one 5 // AVFoundation API is only introduced in Mac OS X > 10.6, and there is only one
6 // build of Chromium, so the (potential) linking with AVFoundation has to happen 6 // build of Chromium, so the (potential) linking with AVFoundation has to happen
7 // in runtime. For this to be clean, an AVFoundationGlue class is defined to try 7 // in runtime. For this to be clean, an AVFoundationGlue class is defined to try
8 // and load these AVFoundation system libraries. If it succeeds, subsequent 8 // and load these AVFoundation system libraries. If it succeeds, subsequent
9 // clients can use AVFoundation via the rest of the classes declared in this 9 // clients can use AVFoundation via the rest of the classes declared in this
10 // file. 10 // file.
(...skipping 23 matching lines...) Expand all
34 34
35 // Originally coming from AVMediaFormat.h but in global namespace. 35 // Originally coming from AVMediaFormat.h but in global namespace.
36 static NSString* AVMediaTypeVideo(); 36 static NSString* AVMediaTypeVideo();
37 static NSString* AVMediaTypeAudio(); 37 static NSString* AVMediaTypeAudio();
38 static NSString* AVMediaTypeMuxed(); 38 static NSString* AVMediaTypeMuxed();
39 39
40 // Originally from AVCaptureSession.h but in global namespace. 40 // Originally from AVCaptureSession.h but in global namespace.
41 static NSString* AVCaptureSessionRuntimeErrorNotification(); 41 static NSString* AVCaptureSessionRuntimeErrorNotification();
42 static NSString* AVCaptureSessionDidStopRunningNotification(); 42 static NSString* AVCaptureSessionDidStopRunningNotification();
43 static NSString* AVCaptureSessionErrorKey(); 43 static NSString* AVCaptureSessionErrorKey();
44 static NSString* AVCaptureSessionPreset320x240();
45 static NSString* AVCaptureSessionPreset640x480();
46 static NSString* AVCaptureSessionPreset1280x720();
47 44
48 // Originally from AVVideoSettings.h but in global namespace. 45 // Originally from AVVideoSettings.h but in global namespace.
49 static NSString* AVVideoScalingModeKey(); 46 static NSString* AVVideoScalingModeKey();
50 static NSString* AVVideoScalingModeResizeAspectFill(); 47 static NSString* AVVideoScalingModeResizeAspectFill();
51 48
52 static Class AVCaptureSessionClass(); 49 static Class AVCaptureSessionClass();
53 static Class AVCaptureVideoDataOutputClass(); 50 static Class AVCaptureVideoDataOutputClass();
54 51
55 private: 52 private:
56 DISALLOW_IMPLICIT_CONSTRUCTORS(AVFoundationGlue); 53 DISALLOW_IMPLICIT_CONSTRUCTORS(AVFoundationGlue);
57 }; 54 };
58 55
59 // Originally AVCaptureDevice and coming from AVCaptureDevice.h 56 // Originally AVCaptureDevice and coming from AVCaptureDevice.h
60 MEDIA_EXPORT 57 MEDIA_EXPORT
61 @interface CrAVCaptureDevice : NSObject 58 @interface CrAVCaptureDevice : NSObject
62 59
63 - (BOOL)hasMediaType:(NSString*)mediaType; 60 - (BOOL)hasMediaType:(NSString*)mediaType;
64 - (NSString*)uniqueID; 61 - (NSString*)uniqueID;
65 - (NSString*)localizedName; 62 - (NSString*)localizedName;
66 - (BOOL)isSuspended; 63 - (BOOL)isSuspended;
67 - (BOOL)supportsAVCaptureSessionPreset:(NSString*)preset;
68 - (NSArray*)formats; 64 - (NSArray*)formats;
69 65
70 @end 66 @end
71 67
72 // Originally AVCaptureDeviceFormat and coming from AVCaptureDevice.h. 68 // Originally AVCaptureDeviceFormat and coming from AVCaptureDevice.h.
73 MEDIA_EXPORT 69 MEDIA_EXPORT
74 @interface CrAVCaptureDeviceFormat : NSObject 70 @interface CrAVCaptureDeviceFormat : NSObject
75 71
76 - (CoreMediaGlue::CMFormatDescriptionRef)formatDescription; 72 - (CoreMediaGlue::CMFormatDescriptionRef)formatDescription;
77 - (NSArray*)videoSupportedFrameRateRanges; 73 - (NSArray*)videoSupportedFrameRateRanges;
(...skipping 14 matching lines...) Expand all
92 88
93 MEDIA_EXPORT 89 MEDIA_EXPORT
94 @interface CrAVCaptureOutput // Originally from AVCaptureOutput.h. 90 @interface CrAVCaptureOutput // Originally from AVCaptureOutput.h.
95 @end 91 @end
96 92
97 // Originally AVCaptureSession and coming from AVCaptureSession.h. 93 // Originally AVCaptureSession and coming from AVCaptureSession.h.
98 MEDIA_EXPORT 94 MEDIA_EXPORT
99 @interface CrAVCaptureSession : NSObject 95 @interface CrAVCaptureSession : NSObject
100 96
101 - (void)release; 97 - (void)release;
102 - (BOOL)canSetSessionPreset:(NSString*)preset;
103 - (void)setSessionPreset:(NSString*)preset;
104 - (NSString*)sessionPreset;
105 - (void)addInput:(CrAVCaptureInput*)input; 98 - (void)addInput:(CrAVCaptureInput*)input;
106 - (void)removeInput:(CrAVCaptureInput*)input; 99 - (void)removeInput:(CrAVCaptureInput*)input;
107 - (void)addOutput:(CrAVCaptureOutput*)output; 100 - (void)addOutput:(CrAVCaptureOutput*)output;
108 - (void)removeOutput:(CrAVCaptureOutput*)output; 101 - (void)removeOutput:(CrAVCaptureOutput*)output;
109 - (BOOL)isRunning; 102 - (BOOL)isRunning;
110 - (void)startRunning; 103 - (void)startRunning;
111 - (void)stopRunning; 104 - (void)stopRunning;
112 105
113 @end 106 @end
114 107
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // Class to provide access to class methods of AVCaptureDeviceInput. 161 // Class to provide access to class methods of AVCaptureDeviceInput.
169 MEDIA_EXPORT 162 MEDIA_EXPORT
170 @interface AVCaptureDeviceInputGlue : NSObject 163 @interface AVCaptureDeviceInputGlue : NSObject
171 164
172 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device 165 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device
173 error:(NSError**)outError; 166 error:(NSError**)outError;
174 167
175 @end 168 @end
176 169
177 #endif // MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ 170 #endif // MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_
OLDNEW
« no previous file with comments | « no previous file | media/video/capture/mac/avfoundation_glue.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698