DeepAR iOS  v5.2.0
Instance Methods | List of all members
<DeepARDelegate> Protocol Reference

A delegate that is used to notify events from DeepAR to the consumer of the DeepAR SDK. More...

#import <DeepAR.h>

Inheritance diagram for <DeepARDelegate>:

Instance Methods

(void) - didTakeScreenshot:
 Called when DeepAR has finished taking a screenshot. More...
 
(void) - didInitialize
 Called when the DeepAR engine initialization is complete.
 
(void) - faceVisiblityDidChange:
 Called when DeepAR detects a new face or loses a face that has been tracked. More...
 
(void) - frameAvailable:
 Called when a new processed frame is available. More...
 
(void) - faceTracked:
 Called on each frame where at least one face data is detected. More...
 
(void) - numberOfFacesVisibleChanged:
 Whenever a face is detected or lost from the scene this method is called. More...
 
(void) - didFinishShutdown
 DeepAR has successfully shut down after the method shutdown call.
 
(void) - imageVisibilityChanged:imageVisible:
 DeepAR has the ability to track arbitrary images in the scene. More...
 
(void) - didSwitchEffect:
 Called when the switchEffect method has successfully switched given effect on a given slot. More...
 
(void) - animationTransitionedToState:
 Called when the conditions have been met for the animation to transition to the next state (e.g. mouth open, emotion detected etc.). More...
 
(void) - didStartVideoRecording
 Called when DeepAR has started video recording (after calling startVideoRecording method).
 
(void) - didFinishPreparingForVideoRecording
 Called when the video recording preparation is finished.
 
(void) - didFinishVideoRecording:
 Called when the video recording is finished. More...
 
(void) - recordingFailedWithError:
 Called when an error has occurred during video recording. More...
 
(void) - onErrorWithCode:error:
 Called when an error has occurred. More...
 

Detailed Description

A delegate that is used to notify events from DeepAR to the consumer of the DeepAR SDK.

It is set on DeepAR or ARView.

Method Documentation

◆ animationTransitionedToState:

- (void) animationTransitionedToState: (NSString *)  state
optional

Called when the conditions have been met for the animation to transition to the next state (e.g. mouth open, emotion detected etc.).

Parameters
NSString*state The state name.

◆ didFinishVideoRecording:

- (void) didFinishVideoRecording: (NSString *)  videoFilePath
optional

Called when the video recording is finished.

Parameters
NSString*videoFilePath The video file path.

◆ didSwitchEffect:

- (void) didSwitchEffect: (NSString *)  slot
optional

Called when the switchEffect method has successfully switched given effect on a given slot.

Parameters
NSString*slot The slot name.

◆ didTakeScreenshot:

- (void) didTakeScreenshot: (UIImage *)  screenshot
optional

Called when DeepAR has finished taking a screenshot.

The result is given as an UIImage object in the screenshot parameter.

Parameters
UIImage*screenshot The taken screenshot.

◆ faceTracked:

- (void) faceTracked: (MultiFaceData faceData
optional

Called on each frame where at least one face data is detected.

Parameters
MultiFaceDatafaceData The face data.

◆ faceVisiblityDidChange:

- (void) faceVisiblityDidChange: (BOOL)  faceVisible
optional

Called when DeepAR detects a new face or loses a face that has been tracked.

Parameters
BOOLfaceVisible Any face visibility.

◆ frameAvailable:

- (void) frameAvailable: (CMSampleBufferRef)  sampleBuffer
optional

Called when a new processed frame is available.

Make sure to call startCaptureWithOutputWidth on DeepAR (or startFrameOutputWithOutputWidth if you use ARView) if you want this method to be called whenever a new frame is ready.

Parameters
CMSampleBufferRefsampleBuffer New frame.

◆ imageVisibilityChanged:imageVisible:

- (void) imageVisibilityChanged: (NSString *)  gameObjectName
imageVisible: (BOOL)  imageVisible 
optional

DeepAR has the ability to track arbitrary images in the scene.

Parameters
NSString*gameObjectName The name of the node in the filter file to which the image is associated.
BOOLimageVisible New visibility.

◆ numberOfFacesVisibleChanged:

- (void) numberOfFacesVisibleChanged: (NSInteger)  facesVisible
optional

Whenever a face is detected or lost from the scene this method is called.

Parameters
NSIntegerfacesVisible The number of currently detected faces in the frame.

◆ onErrorWithCode:error:

- (void) onErrorWithCode: (ARErrorType code
error: (NSString *)  error 
optional

Called when an error has occurred.

Parameters
ARErrorTypecode Error type.
NSString*error Error message.

◆ recordingFailedWithError:

- (void) recordingFailedWithError: (NSError *)  error
optional

Called when an error has occurred during video recording.

Parameters
NSError*error The video recording error.

The documentation for this protocol was generated from the following file: