Protocols

The following protocols are available globally.

  • Callback to get center of square bounding the face.

    See more

    Declaration

    Objective-C

    @protocol BNBCameraPoiListener

    Swift

    protocol BNBCameraPoiListener
  • Interface to receive notifications on effect change

    See more

    Declaration

    Objective-C

    @protocol BNBEffectActivatedListener

    Swift

    protocol BNBEffectActivatedListener
  • Callback interface to receive effect activation notification

    See more

    Declaration

    Objective-C

    @protocol BNBEffectActivationCompletionListener

    Swift

    protocol BNBEffectActivationCompletionListener
  • Callback interface for effect events.

    See more

    Declaration

    Objective-C

    @protocol BNBEffectEventListener

    Swift

    protocol BNBEffectEventListener
  • Callback interface to receive effect info changes.

    See more

    Declaration

    Objective-C

    @protocol BNBEffectInfoListener

    Swift

    protocol BNBEffectInfoListener
  • Interface to receive errors from EffectPlayer. Could be called from any thread inside EffectPlayer. So the implementation of this listener should be thread-safe.

    See more

    Declaration

    Objective-C

    @protocol BNBErrorListener

    Swift

    protocol BNBErrorListener
  • Callback to get face number detected.

    See more

    Declaration

    Objective-C

    @protocol BNBFaceNumberListener

    Swift

    protocol BNBFaceNumberListener
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol BNBFeature
    
    /**must return unique id (e.g. a feature pointer or a true random number(most likely) satisfies this criteria) */
    - (int64_t)id;
    
    - (nonnull NSString *)name;
    
    - (BOOL)requiresMainThread;
    
    - (void)clean;
    
    - (void)process:(nullable BNBFrameData *)frameData;
    
    - (void)postprocess:(nullable BNBFrameData *)fd
               futureFd:(nullable BNBFrameData *)futureFd;
    
    @end

    Swift

    protocol BNBFeature
  • Callback to get freshly processed frame_data.

    See more

    Declaration

    Objective-C

    @protocol BNBFrameDataListener

    Swift

    protocol BNBFrameDataListener
  • Callback interface to receive FPS timings.

    See more

    Declaration

    Objective-C

    @protocol BNBFrameDurationListener

    Swift

    protocol BNBFrameDurationListener
  • Callback to receive “hints” (e.g. “Open mouth” from effect). Display them on UI.

    See more

    Declaration

    Objective-C

    @protocol BNBHintListener

    Swift

    protocol BNBHintListener
  • Callback for JS execution results.

    See more

    Declaration

    Objective-C

    @protocol BNBJsCallback

    Swift

    protocol BNBJsCallback
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol BNBLogRecordCallback
    
    - (void)onLogRecordCallback:(BNBSeverityLevel)level
                         domain:(nonnull NSString *)domain
                        message:(nonnull NSString *)message;
    
    @end

    Swift

    protocol BNBLogRecordCallback
  • internal

    See more

    Declaration

    Objective-C

    @protocol BNBLowLightListener

    Swift

    protocol BNBLowLightListener
  • Interface to receive loading result from video.

    See more

    Declaration

    Objective-C

    @protocol BNBVideoLoadingResultListener

    Swift

    protocol BNBVideoLoadingResultListener
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol BNBVisualClipListener
    
    - (BOOL)shouldContinueProcessing:(int32_t)completedFramesCount
                    totalFramesCount:(int32_t)totalFramesCount;
    
    @end

    Swift

    protocol BNBVisualClipListener