-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCameraView.h
executable file
·64 lines (57 loc) · 1.69 KB
/
CameraView.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// CameraView.h
// test
//
// Created by Brian Olencki on 11/21/15.
// Copyright © 2015 bolencki13. All rights reserved.
//
//SBApplicationShortcutMenuContentView.h
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import <QuartzCore/QuartzCore.h>
#import <CoreVideo/CoreVideo.h>
#import <CoreMedia/CoreMedia.h>
#import "CornerHighlightView.h"
// #import <ImageIO/ImageIO.h>
@class CameraView;
@protocol CameraViewDelegate <NSObject>
- (void)cameraViewDidFinishLoading:(CameraView*)camera;
- (void)cameraViewDidTakePhoto:(CameraView*)camera;
@end
typedef enum {
FrontView,
BackView,
UnknownView
} CameraMode;
@interface CameraView : UIView {
AVCaptureSession *captureSession;
AVCaptureDevice *inputDevice;
AVCaptureDeviceInput *captureInput;
AVCaptureVideoPreviewLayer *livePreviewLayer;
AVCaptureStillImageOutput *stillImageOutput;
CGPoint touchStart;
CGPoint previousPoint;
BOOL isUp, isRight;
BOOL isResizingLR, isResizingUL, isResizingUR, isResizingLL;
BOOL touchForPhoto, updateFrame;
CGFloat x, y, width, height;
float deltaWidth, deltaHeight;
CGPoint touchPoint, previous;
BOOL touchingCorner;
BOOL torchIsOn;
BOOL calculatedCorner;
__unsafe_unretained id<CameraViewDelegate> _delegate;
CGRect _iconFrame;
CornerHighlightView *cameraCornerView;
CornerType corner;
}
@property (assign, nonatomic) id<CameraViewDelegate> delegate;
@property (assign, nonatomic) CGRect iconFrame;
- (void)presentCamera:(int)arg1;
- (void)dismissCameraAndTakePhoto:(BOOL)takePhoto;
- (void)setCameraViewMode:(CameraMode)cameraModeView;
- (void)shutter;
- (void)resize;
- (void)doneLoading;
@end