7#import <Foundation/Foundation.h>
9#import <AVFoundation/AVFoundation.h>
34 float landmarks[68 * 3];
39 float landmarks2d[68 * 3];
58 float actionUnits[63];
263 bool initializeFaceTrackingSynchronously;
279- (void)didTakeScreenshot:(UIImage*)screenshot;
290- (void)faceVisiblityDidChange:(BOOL)faceVisible;
297- (void)frameAvailable:(CMSampleBufferRef)sampleBuffer;
309- (void)numberOfFacesVisibleChanged:(NSInteger)facesVisible;
321- (void)imageVisibilityChanged:(NSString*)gameObjectName imageVisible:(BOOL)imageVisible;
327- (void)didSwitchEffect:(NSString*)slot;
333- (void)animationTransitionedToState:(NSString*)state;
349- (void)didFinishVideoRecording:(NSString*)videoFilePath;
355- (void)recordingFailedWithError:(NSError*)error;
362- (void)onErrorWithCode:(
ARErrorType)code error:(NSString*)error;
366#define ARViewDelegate DeepARDelegate
377@property (nonatomic, weak) id<DeepARDelegate>
delegate;
457- (void)setLicenseKey:(NSString*)key;
466- (void)initializeWithWidth:(NSInteger)width height:(NSInteger)height window:(CAEAGLLayer*)window;
479- (void)initializeOffscreenWithWidth:(NSInteger)width height:(NSInteger)height;
487- (UIView*)createARViewWithFrame:(CGRect)frame;
501- (void)setRenderingResolutionWithWidth:(NSInteger)width height:(NSInteger)height;
515- (UIView*)switchToRenderingToViewWithFrame:(CGRect)frame;
523- (void)switchToRenderingOffscreenWithWidth:(NSInteger)width height:(NSInteger)height;
531- (void)changeLiveMode:(BOOL)liveMode;
550- (void)processFrame:(CVPixelBufferRef)imageBuffer mirror:(BOOL)mirror;
559- (void)processFrame:(CVPixelBufferRef)imageBuffer mirror:(BOOL)mirror timestamp:(CMTimeValue)timestamp;
568- (void)processFrameAndReturn:(CVPixelBufferRef)imageBuffer outputBuffer:(CVPixelBufferRef)outputBuffer mirror:(BOOL)mirror;
576- (void)enqueueCameraFrame:(CMSampleBufferRef)sampleBuffer mirror:(BOOL)mirror;
583- (void)enqueueAudioSample:(CMSampleBufferRef)sampleBuffer;
590- (void)setVideoRecordingOutputName:(NSString*)outputName;
600- (void)setVideoRecordingOutputPath:(NSString*)outputPath;
607- (void)startVideoRecordingWithOutputWidth:(
int)outputWidth outputHeight:(
int)outputHeight;
615- (void)startVideoRecordingWithOutputWidth:(
int)outputWidth outputHeight:(
int)outputHeight subframe:(CGRect)subframe;
624- (void)startVideoRecordingWithOutputWidth:(
int)outputWidth outputHeight:(
int)outputHeight subframe:(CGRect)subframe videoCompressionProperties:(NSDictionary*)videoCompressionProperties;
634- (void)startVideoRecordingWithOutputWidth:(
int)outputWidth outputHeight:(
int)outputHeight subframe:(CGRect)subframe videoCompressionProperties:(NSDictionary*)videoCompressionProperties recordAudio:(BOOL)recordAudio;
645- (void)switchEffectWithSlot:(NSString*)slot path:(NSString*)path;
663- (void)switchEffectWithSlot:(NSString*)slot path:(NSString*)path face:(NSInteger)face;
672- (void)switchEffectWithSlot:(NSString*)slot path:(NSString*)path face:(NSInteger)face targetGameObject:(NSString*)targetGameObject;
679- (void)switchEffectWithSlot:(NSString*)slot data:(NSData*)data;
687- (void)switchEffectWithSlot:(NSString*)slot data:(NSData*)data face:(NSInteger)face;
715- (void)enableAudioProcessing:(BOOL)enabled;
722- (void)setAudioProcessingSemitone:(
float)sts;
731- (void)startCaptureWithOutputWidth:(NSInteger)outputWidth outputHeight:(NSInteger)outputHeight subframe:(CGRect)subframe;
741- (void)startCaptureWithOutputWidthAndFormat:(NSInteger)outputWidth outputHeight:(NSInteger)outputHeight subframe:(CGRect)subframe outputImageFormat:(
OutputFormat)outputFormat;
753- (void)fireTrigger:(NSString*)trigger;
758- (void)touchOccurred:(
TouchInfo)touchInfo;
764- (void)showStats:(BOOL) enabled;
770- (void)simulatePhysics:(BOOL) enabled;
776- (void)showColliders:(BOOL) enabled;
782- (void)setFaceDetectionSensitivity:(NSInteger)sensitivity;
792- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter floatValue:(
float)value;
802- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter vectorValue:(
Vector4)value;
812- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter vector3Value:(
Vector3)value;
822- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter boolValue:(BOOL)value;
832- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter image:(UIImage*)image;
842- (void)changeParameter:(NSString*)gameObject component:(NSString*)component parameter:(NSString*)parameter stringValue:(NSString*)value;
851- (void)moveGameObject:(NSString*)selectedGameObjectName targetGameObjectname:(NSString*)targetGameObjectName;
876- (bool)hasVar:(NSString*)name slot:(NSString*) slot;
884- (bool)hasVar:(NSString*)name;
893- (
VarType)getVarType:(NSString*)name slot:(NSString*) slot;
902- (
VarType)getVarType:(NSString*)name;
911- (bool)getBoolVar:(NSString*)name slot:(NSString*) slot;
919- (bool)getBoolVar:(NSString*)name;
928- (int)getIntVar:(NSString*)name slot:(NSString*) slot;
936- (int)getIntVar:(NSString*)name;
945- (double)getDoubleVar:(NSString*)name slot:(NSString*) slot;
953- (double)getDoubleVar:(NSString*)name;
962- (NSString*)getStringVar:(NSString*)name slot:(NSString*) slot;
970- (NSString*)getStringVar:(NSString*)name;
980- (bool)setBoolVar:(NSString*)name value:(
bool)value slot:(NSString*) slot;
989- (bool)setBoolVar:(NSString*)name value:(
bool)value;
999- (bool)setIntVar:(NSString*)name value:(
int)value slot:(NSString*) slot;
1008- (bool)setIntVar:(NSString*)name value:(
int)value;
1018- (bool)setDoubleVar:(NSString*)name value:(
double)value slot:(NSString*) slot;
1027- (bool)setDoubleVar:(NSString*)name value:(
double)value;
1037- (bool)setStringVar:(NSString*)name value:(NSString*)value slot:(NSString*) slot;
1046- (bool)setStringVar:(NSString*)name value:(NSString*)value;
1055- (bool)deleteVar:(NSString*)name slot:(NSString*) slot;
1063- (bool)deleteVar:(NSString*)name;
Conatins the ARView DeepAR view class which extends UIView.
Contains the CameraController helper class that controls the camera device.
VarType
Possible variable types.
Definition: DeepAR.h:215
@ DOUBLE
Double variable type.
Definition: DeepAR.h:227
@ BOOLEAN
Bool variable type.
Definition: DeepAR.h:219
@ STRING
String variable type.
Definition: DeepAR.h:231
@ INT
Integer variable type.
Definition: DeepAR.h:223
ARErrorType
DeepAR error types.
Definition: DeepAR.h:175
@ DEEPAR_ERROR_TYPE_WARNING
DeepAR warning type.
Definition: DeepAR.h:187
@ DEEPAR_ERROR_TYPE_DEBUG
DeepAR debug type.
Definition: DeepAR.h:179
@ DEEPAR_ERROR_TYPE_ERROR
DeepAR error type.
Definition: DeepAR.h:191
@ DEEPAR_ERROR_TYPE_INFO
DeepAR info type.
Definition: DeepAR.h:183
TouchType
Possible types of an occurred touch.
Definition: DeepAR.h:197
@ START
Touch type that implies that a touch was started.
Definition: DeepAR.h:201
@ END
Touch type that implies that a previously started touch ended.
Definition: DeepAR.h:209
@ MOVE
Touch type that implies that a previously started touch changed.
Definition: DeepAR.h:205
OutputFormat
Output color format.
Definition: DeepAR.h:145
@ Undefined
Undefined format.
Definition: DeepAR.h:149
@ ARGB
Alpha, red, green and blue format.
Definition: DeepAR.h:161
@ COUNT
Number of formats.
Definition: DeepAR.h:169
@ ABGR
Alpha, blue, green and red format.
Definition: DeepAR.h:165
@ RGBA
Red, green, blue and alpha format.
Definition: DeepAR.h:153
@ BGRA
Blue, green, red and alpha format.
Definition: DeepAR.h:157
Main class for interacting with DeepAR engine.
Definition: DeepAR.h:373
id< DeepARDelegate > delegate
The object which implements DeepARDelegate protocol to listen for async events coming from DeepAR.
Definition: DeepAR.h:377
void pauseVideoRecording()
Pauses video recording if it has been started beforehand.
bool clearVars()
Clear all variables.
void finishVideoRecording()
Finishes the video recording.
BOOL visionInitialized
Indicates if computer vision components have been initialized during the initialization process.
Definition: DeepAR.h:382
void shutdown()
Shuts down the DeepAR engine.
BOOL isVisionOnly()
Indicates if DeepAR has been initialized in the vision-only mode or not.
BOOL videoRecordingWarmupEnabled
If set to true, changes how startVideoRecording and resumeVideoRecording methods work to allow the v...
Definition: DeepAR.h:434
void startProfiling()
Starts recording profiling stats by writing them to a CSV-formatted stream.
void resume()
Resumes the rendering if it was previously paused, otherwise doesn't do anything.
NSDictionary * audioCompressionSettings
The audio compression settings.
Definition: DeepAR.h:439
void pause()
Pauses the rendering.
BOOL faceVisible
Indicates if at least one face is detected in the current frame.
Definition: DeepAR.h:392
void stopCapture()
Stops outputting frames to frameAvailable .
NSString * sdkVersion()
The DeepAR SDK version number.
void stopProfiling()
Stops recording profiling stats and sends the recorded CSV to the stat export server.
BOOL renderingInitialized
Indicates if DeepAR rendering components have been initialized during the initialization process.
Definition: DeepAR.h:387
void resumeVideoRecording()
Resumes video recording after it has been paused with pauseVideoRecording.
void initialize()
Starts the engine initialization where the DeepAR will initialize in vision only mode.
void takeScreenshot()
Produces a snapshot of the current screen preview.
CGSize renderingResolution
Rendering resolution with which the DeepAR has been initialized.
Definition: DeepAR.h:397
A delegate that is used to notify events from DeepAR to the consumer of the DeepAR SDK.
Definition: DeepAR.h:270
void didInitialize()
Called when the DeepAR engine initialization is complete.
void didFinishPreparingForVideoRecording()
Called when the video recording preparation is finished.
void didStartVideoRecording()
Called when DeepAR has started video recording (after calling startVideoRecording method).
void didFinishShutdown()
DeepAR has successfully shut down after the method shutdown call.
Represents data structure containing all the information available about the detected face.
Definition: DeepAR.h:14
int numberOfActionUnits
The number of action units.
Definition: DeepAR.h:62
BOOL detected
Determines whether the face is detected or not.
Definition: DeepAR.h:18
bool initializeEngineWithFaceTracking
Definition: DeepAR.h:257
Structure containing face data for up to 4 detected faces.
Definition: DeepAR.h:68
The video (and audio) recording configuration.
Definition: DeepAR.h:78
BOOL recordAudio
Determine whether audio is recorded or not.
Definition: DeepAR.h:98
CGRect subframe
The sub rectangle of the ARView that you want to record in normalized coordinates (0....
Definition: DeepAR.h:90
NSInteger outputWidth
The output video width.
Definition: DeepAR.h:82
NSDictionary * videoCompressionProperties
An NSDictionary used as the value for the key AVVideoCompressionPropertiesKey. Read more about video ...
Definition: DeepAR.h:94
NSInteger outputHeight
The output video height.
Definition: DeepAR.h:86
Contains information about the current location and status of the started touch.
Definition: DeepAR.h:237
CGFloat y
Value of the y coordinate of the current touch location.
Definition: DeepAR.h:245
TouchType type
The status, i.e., touch type, of the touch.
Definition: DeepAR.h:249
CGFloat x
Value of the x coordinate of the current touch location.
Definition: DeepAR.h:241
A three-dimensional float vector.
Definition: DeepAR.h:126
float x
X value.
Definition: DeepAR.h:130
float y
Y value.
Definition: DeepAR.h:134
float z
Z value.
Definition: DeepAR.h:138
A four-dimensional float vector.
Definition: DeepAR.h:104
float x
X value.
Definition: DeepAR.h:108
float y
Y value.
Definition: DeepAR.h:112
float w
W value.
Definition: DeepAR.h:120
float z
Z value.
Definition: DeepAR.h:116