DeepAR iOS  v5.2.0
ARView.h
Go to the documentation of this file.
1
7#import <UIKit/UIKit.h>
8#import <AVFoundation/AVFoundation.h>
9#import "DeepAR.h"
10
15@interface ARView : UIView
16
20@property (nonatomic, strong) DeepAR* deepAR;
21
26@property (nonatomic, readonly) BOOL initialized;
27
31@property (nonatomic, readonly) BOOL faceVisible;
32
36@property (nonatomic, readonly) CGSize renderingResolution;
37
41@property (nonatomic, weak) id<DeepARDelegate> delegate;
42
54- (void)setLicenseKey:(NSString*)key;
55
78- (void)initialize;
79
84- (void)resume;
85
91- (void)pause;
92
103- (void)switchEffectWithSlot:(NSString*)slot path:(NSString*)path;
104
122- (void)switchEffectWithSlot:(NSString*)slot path:(NSString*)path face:(uint32_t)face;
123
132- (void)switchEffectWithSlot:(NSString*)slot path:(NSString*)path face:(uint32_t)face targetGameObject:(NSString*)targetGameObject;
133
139- (void)takeScreenshot;
140
147- (void)startVideoRecordingWithOutputWidth:(int)outputWidth outputHeight:(int)outputHeight;
148
156- (void)startVideoRecordingWithOutputWidth:(int)outputWidth outputHeight:(int)outputHeight subframe:(CGRect)subframe;
157
166- (void)startVideoRecordingWithOutputWidth:(int)outputWidth outputHeight:(int)outputHeight subframe:(CGRect)subframe videoCompressionProperties:(NSDictionary*)videoCompressionProperties;
167
177- (void)startVideoRecordingWithOutputWidth:(int)outputWidth outputHeight:(int)outputHeight subframe:(CGRect)subframe videoCompressionProperties:(NSDictionary*)videoCompressionProperties recordAudio:(BOOL)recordAudio;
178
185
190- (void)pauseVideoRecording;
191
197
203- (void)enableAudioProcessing:(BOOL)enabled;
204
211- (void)setAudioProcessingSemitone:(float)sts;
212
224- (void)shutdown;
225
234- (void)startFrameOutputWithOutputWidth:(int)outputWidth outputHeight:(int)outputHeight subframe:(CGRect)subframe;
235
240- (void)stopFrameOutput;
241
249- (void)enqueueCameraFrame:(CMSampleBufferRef)sampleBuffer mirror:(BOOL)mirror;
250
257- (void)enqueueAudioSample:(CMSampleBufferRef)sampleBuffer;
258
268- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter floatValue:(float)value;
269
279- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter vectorValue:(Vector4)value;
280
290- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter vector3Value:(Vector3)value;
291
301- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter boolValue:(bool)value;
302
312- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter image:(UIImage*)image;
313
320- (void)fireTrigger:(NSString*)trigger;
321
327- (void)setFaceDetectionSensitivity:(int)sensitivity;
328
334- (void)showStats:(bool)enabled;
335
342- (void)setParameterWithKey:(NSString*)key value:(NSString*)value;
343@end
344
345#import "ARView.h"
346#import "CameraController.h"
Conatins the ARView DeepAR view class which extends UIView.
Contains the CameraController helper class that controls the camera device.
Conatins the main DeepAR classes, structures and enumerations.
ARView is a class that extends UIView with all DeepAR features which can be positioned in the UI hier...
Definition: ARView.h:16
DeepAR * deepAR
Instance of the DeepAR object.
Definition: ARView.h:20
void finishVideoRecording()
Finishes the video recording.
void shutdown()
Shuts down the DeepAR engine.
BOOL faceVisible
Indicates if at least one face is detected in the current frame.
Definition: ARView.h:31
BOOL initialized
Indicates if ARView and the underlying DeepAR engine are successfully initialized.
Definition: ARView.h:26
void pauseVideoRecording()
Pauses video recording.
void resumeVideoRecording()
Resumes video recording after it has been paused with pauseVideoRecording.
void takeScreenshot()
Produces a snapshot of the current screen preview.
CGSize renderingResolution
Rendering resolution with which the DeepAR has been initialized.
Definition: ARView.h:36
id< DeepARDelegate > delegate
Set to the object which implements DeepARDelegate protocol to listen for async events coming from Dee...
Definition: ARView.h:41
void initialize()
Starts the DeepAR engine initialization.
void stopFrameOutput()
Stops outputting frames to frameAvailable .
void pause()
Pauses the rendering.
void resume()
Resumes the rendering if it was previously paused, otherwise doesn't do anything.
Main class for interacting with DeepAR engine.
Definition: DeepAR.h:373
A three-dimensional float vector.
Definition: DeepAR.h:126
A four-dimensional float vector.
Definition: DeepAR.h:104