-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTEST2Controller.h
More file actions
78 lines (67 loc) · 2.6 KB
/
TEST2Controller.h
File metadata and controls
78 lines (67 loc) · 2.6 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// TEST2Controller.h
// TEST2
//
// Created by RossSong on 2017. 5. 23..
//
//
#include "ofxFaceTracker.h"
#import <opencv2/opencv.hpp>
#import "opencv2/highgui/ios.h"
#include "ofxiOSExtras.h"
#include "Clone.h"
#include "AVAsset+VideoOrientation.h"
#import "EffectCollectionViewCell.h"
#import <Foundation/Foundation.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <Photos/Photos.h>
#import <QuartzCore/QuartzCore.h>
#import <GLKit/GLKit.h>
#import "FaceTrackerWrapper.h"
#import "VideoGrabberWrapper.h"
#define BACK_CAM 0
#define FRONT_CAM 1
#define FRAME_PER_SECOND_FOR_SAVE 20
using namespace cv;
@protocol TargetViewControllerDelegate
- (void)backgroundColorChanged:(UIColor*)color;
- (void)setImageViewImage:(UIImage *)image;
- (void)hideGLKView;
- (void)showGLKView;
- (void)glkViewDisplay;
- (UIImage *)getImageViewImage;
@end
@interface TEST2Controller : NSObject
@property (strong, nonatomic) id<FaceTrackerProtocol> cameraFaceTracker;
@property (strong, nonatomic) id<FaceTrackerProtocol> maskFaceTracker;
@property (strong, nonatomic) id<VideoGrabberProtocol> cam;
@property (retain, nonatomic) id<TargetViewControllerDelegate> targetDelegate;
@property (strong, nonatomic) NSTimer *animationTimer;
@property (strong, nonatomic) NSArray *arrayEffects;
@property (assign, nonatomic) BOOL isRecording;
@property (strong, nonatomic) AVAssetWriter *videoWriter;
@property (strong, nonatomic) AVAssetWriterInput* writerInput;
@property (strong, nonatomic) AVAssetWriterInputPixelBufferAdaptor *adaptor;
@property (assign, nonatomic) NSInteger frameIndex;
@property (assign, nonatomic) int cameraId;
@property (strong, nonatomic) AVAsset *avasset;
@property (assign, nonatomic) int counter;
@property (assign, nonatomic) Float64 durationSeconds;
@property (assign, nonatomic) Float64 totalFrames;
@property (assign, nonatomic) Float64 timePerFrame;
@property (strong, nonatomic) AVAssetImageGenerator *imageGenerator;
@property (assign, nonatomic) BOOL usingLocalFile;
@property (assign, nonatomic) float framePerSecond;
- (void)setup;
- (void)setupArrayEffects;
- (void)setupCamera:(id<VideoGrabberProtocol>)camera;
- (void)setFaceTrackersWithMaskFaceTracker:(id<FaceTrackerProtocol>)maskTracker
withCameraFaceTracker:(id<FaceTrackerProtocol>)cameraTracker;
- (void)readMP4IfUsingLocalFile;
- (void)setupMaskFraceTracker:(NSString *)stringFileName;
- (void)stopTimer;
- (void)switchCamera;
- (void)toggleButtonVideoRecord;
- (void)drawGLKView:(GLKView *)view drawInRect:(CGRect)rect;
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info;
@end