-
Notifications
You must be signed in to change notification settings - Fork 0
/
QSCameraController.h
47 lines (36 loc) · 2.25 KB
/
QSCameraController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* ____ _ __ _____ __ __ ____
* / __ \__ __(_)____/ /__/ ___// /_ ____ ____ / /_/ __ \_________
* / / / / / / / / ___/ //_/\__ \/ __ \/ __ \/ __ \/ __/ /_/ / ___/ __ \
* / /_/ / /_/ / / /__/ ,< ___/ / / / / /_/ / /_/ / /_/ ____/ / / /_/ /
* \___\_\__,_/_/\___/_/|_|/____/_/ /_/\____/\____/\__/_/ /_/ \____/
*
* QSCameraController.h
* © 2013 Aditya KD
*/
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <PhotoLibrary/PLCameraControllerDelegate-Protocol.h>
#import "QSVideoInterface.h"
#import "QSConstants.h"
@interface QSCameraController : NSObject <PLCameraControllerDelegate, QSVideoInterfaceDelegate, UIAlertViewDelegate>
@property(nonatomic, assign) QSCameraDevice cameraDevice;
@property(nonatomic, assign) QSFlashMode flashMode;
@property(nonatomic, assign) BOOL enableHDR;
// Setting this property to yes causes the controller to wait for up to 5 seconds for focusing to complete before taking a photo
@property(nonatomic, assign) BOOL waitForFocusCompletion;
// Automatically set every time the orientation changes, but you can force a different orientation, provided it doesn't change after you've forced it.
@property(nonatomic, assign) UIDeviceOrientation currentOrientation;
@property(nonatomic, readonly, getter = isCapturingVideo) BOOL capturingVideo;
@property(nonatomic, readonly, getter = isCapturingImage) BOOL capturingImage;
// video properties
@property(nonatomic, copy) NSString *videoCaptureQuality;
@property(nonatomic, assign) QSFlashMode videoFlashMode;
+ (instancetype)sharedInstance;
// The completion handlers are copied. They are, however, destroyed after being called, so no need to worry about retain loops
- (void)takePhotoWithCompletionHandler:(QSCompletionHandler)completionHandler;
// Pass in an interruption handler. Seriously. You don't want to never get a callback of this.
// All these methods will work if you pass in nil as the handler. Do you if you don't care what happens
- (void)startVideoCaptureWithHandler:(QSCompletionHandler)handler interruptionHandler:(QSCompletionHandler)interruptionHandler;
- (void)stopVideoCaptureWithHandler:(QSCompletionHandler)handler;
@end