Banuba SDK
BNBEffectPlayer.h
Go to the documentation of this file.
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from effect_player.djinni
3 
4 #import "BNBAnalyticsConfig.h"
6 #import "BNBConsistencyMode.h"
9 #import "BNBFaceSearchMode.h"
10 #import "BNBFrameData.h"
11 #import "BNBPixelFormat.h"
12 #import "BNBPixelRect.h"
14 #import "BNBScene.h"
15 #import "BanubaEffectPlayer/BNBFullImageData.h"
16 #import <Foundation/Foundation.h>
17 @class BNBDebugInterface;
18 @class BNBEffectManager;
19 @class BNBEffectPlayer;
20 @class BNBInputManager;
21 @protocol BNBAnalyticsListener;
22 @protocol BNBCameraPoiListener;
24 @protocol BNBEffectInfoListener;
25 @protocol BNBFaceNumberListener;
26 @protocol BNBFrameDataListener;
27 @protocol BNBFrameDurationListener;
28 @protocol BNBLowLightListener;
29 
30 
31 /**
32  * The EffectPlayer class provides ability to play AR effects on set of images or video.
33  * <h2>Lifecycle</h2>
34  * In order to support an application lifecycle EffectPlayer provides special methods
35  * to control it during application states like pause or losing focus.
36  * <h3>Effect playback</h3>
37  * Initial playback state of newly created Effect Player instance is `active`. With playback
38  * control methods described below, the player can be launched/resumed or paused. State of effect
39  * player becomes stopped/inactive at the moment of surface loss or by calling the
40  * EffectPlayer::playback_stop method.
41  * One can use next three methods to control effect playback:
42  * <br/> - `EffectPlayer.playback_play`. Switching to active state attempt. Possible from
43  * paused or stopped state and has no effect if effect playback is already active. Playback
44  * resumes from the position saved before `EffectPlayer.playbackPause` call.
45  * <br/> - `EffectPlayer.playback_pause`. Suspend current playback attempt. The recognizer thread
46  * is stopped and all the video textures and audio units playback is stopped as well. Effect
47  * player doesn't react on EffectPlayer::pushFrame calls in suspended state except
48  * asynchronous-inconsistent mode.
49  * <br/> - `EffectPlayer.playbackStop`. Switch to inactive state. In addition to pause clears
50  * recognizer's buffer. The next switch to active state will result in total rerun of active
51  * effect which means that it will be started from the very beginning.
52  * <h2>Android usage example</h2>
53  * If you want an application to be active on windowed mode and if the
54  * focus is on another application you can switch EffectPlayer into active state when
55  * `onStart` activity callback occurs and switch to paused when `onStop` occurs. Otherwise you
56  * can suspend `EffectPlayer` on `onPause` and resume on `onResume` callback to make an
57  * instance of the `EffectPlayer` inactive while activity losing focus.
58  * <h2> Context/surface control</h2>
59  * There are two methods that have to be used to ensure correct operating of the
60  * EffectPlayer. Losing context without notifying the EffectPlayer
61  * leads to application crash. Methods for context changes notification:
62  * <br/> - `EffectPlayer.surfaceCreated`
63  * <br/> - `EffectPlayer.surfaceDestroyed`
64  * <h2> Multi-Threading performance and safety. Listeners.</h2>
65  * EffectPlayer allows to call some of its methods from several threads (simultaneously) for convenience and increased performance.
66  * This is allowed only during normal operation, all invocations from other threads MUST finish before
67  * you start destroying the EffectPlayer instance.
68  * Most methods belong to one of the two groups:
69  * <br/> - MUST be called from the "Main" (also "Render") thread ("Not Reentrant, Not Thread-safe")
70  * <br/> - MAY be called from "Any" thread. Most are "Thread-safe"
71  * Listener callbacks can be called back from any thread.
72  * Generally for best performance and responsiveness you'll have 3 threads:
73  * <br/> - Main(render) thread for drawing-related operations
74  * <br/> - "Camera" thread for handling and push()-ing frames into EffectPlayer
75  * <br/> - UI Thread for handling user interactions and other tasks
76  */
77 @interface BNBEffectPlayer : NSObject
78 
79 + (nullable BNBEffectPlayer *)create:(nonnull BNBEffectPlayerConfiguration *)configuration;
80 
81 /**
82  * Get major version of EffectPlayer. Use this method to filter out breaking changes in
83  * implementation of this class.
84  * @note this is not version of SDK.
85  * @see EffectPlayer.versionMinor
86  */
87 + (int32_t)versionMajor;
88 
89 /**
90  * Get minor version of EffectPlayer
91  * @see EffectPlayer.versionMajor
92  */
93 + (int32_t)versionMinor;
94 
95 /**
96  * Add callback to receive FPS information.
97  * Thread-safe. May be called from any thread
98  */
99 - (void)addFrameDurationListener:(nullable id<BNBFrameDurationListener>)frameDurationListener;
100 
101 /**
102  * Remove callback to receive FPS information.
103  * Thread-safe. May be called from any thread
104  */
105 - (void)removeFrameDurationListener:(nullable id<BNBFrameDurationListener>)frameDurationListener;
106 
107 /**
108  * Add callback to receive faces count in frame.
109  * Thread-safe. May be called from any thread
110  */
111 - (void)addFaceNumberListener:(nullable id<BNBFaceNumberListener>)faceNumberListener;
112 
113 /**
114  * Remove callback to receive faces count in frame.
115  * Thread-safe. May be called from any thread
116  */
117 - (void)removeFaceNumberListener:(nullable id<BNBFaceNumberListener>)faceNumberListener;
118 
119 /**
120  * Add callback to receive frame data right after processing in recognizer.
121  * Thread-safe. May be called from any thread
122  */
123 - (void)addFrameDataListener:(nullable id<BNBFrameDataListener>)frameDataListener;
124 
125 /**
126  * Remove callback to receive frame data right after processing in recognizer.
127  * Thread-safe. May be called from any thread
128  */
129 - (void)removeFrameDataListener:(nullable id<BNBFrameDataListener>)frameDataListener;
130 
131 /**
132  * Add callback to receive low light info
133  * Thread-safe. May be called from any thread
134  */
135 - (void)addLowLightListener:(nullable id<BNBLowLightListener>)lowLightListener;
136 
137 /**
138  * Remove callback to receive low light info
139  * Thread-safe. May be called from any thread
140  */
141 - (void)removeLowLightListener:(nullable id<BNBLowLightListener>)lowLightListener;
142 
143 /**
144  * Add callback to receive center of the face in frame relative to top-left
145  * corner in [0, 1] space.
146  * Thread-safe. May be called from any thread
147  */
148 - (void)addCameraPoiListener:(nullable id<BNBCameraPoiListener>)cameraPoiListener;
149 
150 /**
151  * Remove callback to receive center of the face in frame relative to top-left
152  * Thread-safe. May be called from any thread
153  */
154 - (void)removeCameraPoiListener:(nullable id<BNBCameraPoiListener>)cameraPoiListener;
155 
156 /**
157  * Add callback to receive current effect info from Effect Player.
158  * Thread-safe. May be called from any thread
159  */
160 - (void)addEffectInfoListener:(nullable id<BNBEffectInfoListener>)effectInfoListener;
161 
162 /**
163  * Remove callback to receive current effect info from Effect Player.
164  * Thread-safe. May be called from any thread
165  */
166 - (void)removeEffectInfoListener:(nullable id<BNBEffectInfoListener>)effectInfoListener;
167 
168 /**
169  * Add callback to receive current effect activation notification from Effect Player.
170  * Thread-safe. May be called from any thread
171  */
172 - (void)addEffectActivationCompletionListener:(nullable id<BNBEffectActivationCompletionListener>)effectActivationCompletionListener;
173 
174 /**
175  * Remove callback to receive current effect activation notification from Effect Player.
176  * Thread-safe. May be called from any thread
177  */
178 - (void)removeEffectActivationCompletionListener:(nullable id<BNBEffectActivationCompletionListener>)effectActivationCompletionListener;
179 
180 /**
181  * Sets maximum allowed face results, if face tracking feature is present.
182  * Thread-safe. May be called from any thread
183  * This option is relevant only for GLFX effects.
184  */
185 - (void)setMaxFaces:(int32_t)maxFaces;
186 
187 /**
188  * Set OpenGL name of input external texture.
189  * https://developer.android.com/reference/android/graphics/SurfaceTexture .
190  * MUST be called from the render thread
191  *
192  * @param name Texture name
193  * @param width Textute width
194  * @param height Texture height
195  *
196  * @see setUseExtCamTex
197  *
198  * <br/> Note: This function is Android only.
199  * <br/> Note: We use texture size to calculate aspect ratio only.
200  */
201 - (void)setExternalCameraTexture:(int32_t)name
202  width:(int32_t)width
203  height:(int32_t)height;
204 
205 /**
206  * Use external texture as input source.
207  * MUST be called from the render thread
208  * @see setExternalCameraTexture
209  * @note This function is Android only
210  */
211 - (void)setUseExtCamTex:(BOOL)value;
212 
213 /**
214  * Use to notify the EffectPlayer that the surface exists and effect can be played.
215  * 0, 0 for width and height are valid values.
216  * MUST be called from the render thread
217  */
218 - (void)surfaceCreated:(int32_t)width
219  height:(int32_t)height;
220 
221 /**
222  * Notify about rendering surface being resized.
223  * MUST be called from the render thread
224  */
225 - (void)surfaceChanged:(int32_t)width
226  height:(int32_t)height;
227 
228 /**
229  * This method should be called right before an active context will become invalid.
230  * Switches playback state to inactive state. If it's not done an application will be
231  * crashed on next draw iteration. After losing the surface effect playback can't be
232  * resumed from last position.
233  * MUST be called from the render thread
234  */
235 - (void)surfaceDestroyed;
236 
237 /**
238  * Draw the current effect into the current OpenGL framebuffer. Uses internal frame_data
239  * object obtained from latest push_frame recognition result.
240  *
241  * Return current frame number if drawing was performed and caller should swap buffers
242  * otherwise `DRAW_SKIPPED`(-1)
243  * MUST be called from the render thread
244  */
245 - (int64_t)draw;
246 
247 /**
248  * Draw the current effect into the current OpenGL framebuffer. Uses externally provided frameData
249  * object instead of internal one obtained from latest push_frame recognition result.
250  *
251  * Return frame number from provided frameData if drawing was performed and caller should swap buffers
252  * otherwise `DRAW_SKIPPED`(-1)
253  * MUST be called from the render thread
254  */
255 - (int64_t)drawWithExternalFrameData:(nullable BNBFrameData *)frameData;
256 
257 /**
258  * Record last rendering ("draw_()") result into current OpenGL framebuffer.
259  * Content is cropped to maintain effect_size() aspect ratio
260  * MUST be called from the render thread
261  */
262 - (void)captureBlit:(int32_t)captureWidth
263  captureHeight:(int32_t)captureHeight;
264 
265 /**
266  * Receive the last rendered frame in binary form.
267  *
268  * @param width width of the picture to take, must match the values passed to
269  * `setEffectSize` or `create`
270  * @param height height of the picture to take, must match the values passed to
271  * `setEffectSize` or `create`
272  *
273  * @return RGBA data, size is `width * height * 4`
274  * MUST be called from the render thread
275  */
276 - (nonnull NSData *)readPixels:(int32_t)width
277  height:(int32_t)height;
278 
279 /** Thread-safe. May be called from any thread */
280 - (void)setRenderConsistencyMode:(BNBConsistencyMode)value;
281 
282 /**
283  * Request display of sub-area of the input image into sub-area of the output surface, with optional x,y flips
284  * imageRect is fitted inside viewportRect
285  * Resets transform to default if either rect has 0 dimensions
286  * @param imageRect rectangle in input image coordinates(pixels) after applying input rotations and flips
287  * @param viewportRect rectangle in output surface coordinates(pixels)
288  * MUST be called from the render thread
289  */
290 - (void)setRenderTransform:(nonnull BNBPixelRect *)imageRect
291  viewportRect:(nonnull BNBPixelRect *)viewportRect
292  xFlip:(BOOL)xFlip
293  yFlip:(BOOL)yFlip;
294 
295 /**
296  * Process an image with current effect.
297  *
298  * Must be called from the render thread.
299  *
300  * @param inputImage to avoid conversion recommended to use YUV image
301  * @param outputPixelFormat to avoid conversion recommended to use RGBA
302  * @param params extra image processing arguments
303  */
304 - (nonnull NSData *)processImage:(nonnull BNBFullImageData *)inputImage
305  outputPixelFormat:(BNBPixelFormat)outputPixelFormat
306  params:(nonnull BNBProcessImageParams *)params;
307 
308 /**
309  * Process an image with current effect.
310  * Prefer this method over `processImage` when you have extra input data
311  * besides just an input image.
312  *
313  * Must be called from render thread.
314  *
315  * @param inputFrameData `FrameData` with an image
316  * @param outputPixelFormat to avoid conversion recommended to use RGBA
317  * @param params extra image processing arguments
318  */
319 - (nonnull NSData *)processImageFrameData:(nullable BNBFrameData *)inputFrameData
320  outputPixelFormat:(BNBPixelFormat)outputPixelFormat
321  params:(nonnull BNBProcessImageParams *)params;
322 
323 /**
324  * Process image with current effect.
325  * Must be called from render thread.
326  * NOTE: inputImage have copy overhead, preferable to use process_image method
327  * MUST be called from the render thread
328  * @param inputImage input image with `width * height * 4` size
329  * @param outputPixelFormat to avoid conversion recommended to use RGBA
330  */
331 - (nonnull NSData *)processImageData:(nonnull NSData *)inputImage
332  width:(int32_t)width
333  height:(int32_t)height
334  orientation:(BNBCameraOrientation)orientation
335  isMirrored:(BOOL)isMirrored
336  inputPixelFormat:(BNBPixelFormat)inputPixelFormat
337  outputPixelFormat:(BNBPixelFormat)outputPixelFormat
338  params:(nonnull BNBProcessImageParams *)params;
339 
340 /**
341  * Provides image to process and to play effect.
342  * Thread-safe. May be called from any thread
343  */
344 - (void)pushFrame:(nonnull BNBFullImageData *)fullImage;
345 
346 /**
347  * Provides image to process and to play effect.
348  * Thread-safe. May be called from any thread
349  */
350 - (void)pushFrameWithNumber:(nonnull BNBFullImageData *)fullImage
351  frameNumber:(int64_t)frameNumber;
352 
353 /**
354  * Provides FrameData to process and to play effect.
355  * Must contain full image.
356  * Thread-safe. May be called from any thread
357  */
358 - (void)pushFrameData:(nullable BNBFrameData *)frameData;
359 
360 /** MUST be called from the main(render) thread */
361 - (void)playbackPlay;
362 
363 - (void)playbackPause;
364 
365 - (void)playbackStop;
366 
367 /** Thread-safe. May be called from any thread */
368 - (BNBEffectPlayerPlaybackState)getPlaybackState;
369 
370 /**
371  * If currently loaded effect is based on new Scene engine and it is loaded completly returns Scene object from the effect.
372  * Otherwise returns null.
373  * MUST be called from the render thread
374  * Returned Scene object MUST be used only from the render thread and only while the effect is in the loaded state.
375  */
376 - (nullable BNBScene *)getCurrentScene;
377 
378 /**
379  * Set effect audio volume.
380  * Thread-safe. May be called from any thread
381  * @param volume A value in range `[0, 1]`, where `1` means maximum volume.
382  */
383 - (void)setEffectVolume:(float)volume;
384 
385 /** Set audio enabled */
386 - (void)enableAudio:(BOOL)enable;
387 
388 /**
389  * Get interface to control user iterations. This events will be passed to effect.
390  * Thread-safe. May be called from any thread
391  */
392 - (nullable BNBInputManager *)getInputManager;
393 
394 /**
395  * Initialize video processing. To provide frames use *process_video_frame* methods.
396  * Effect audio is recorded as well and can be accessed using *process_recorded_audio*
397  * and *write_recorded_audio*.
398  * *push_frame* should not be called during processing.
399  * MUST be called from the render thread
400  * @throw Exception Must be aborted with stop_video_processing()
401  */
402 - (void)startVideoProcessing:(int64_t)screenWidth
403  screenHeight:(int64_t)screenHeight
404  orientation:(BNBCameraOrientation)orientation
405  resetEffect:(BOOL)resetEffect
406  offlineMode:(BOOL)offlineMode;
407 
408 /**
409  * Finish processing and return renderer to normal state.
410  * MUST be called from the render thread
411  */
412 - (void)stopVideoProcessing:(BOOL)resetEffect;
413 
414 /**
415  * Provide frame data to evaluate video processing.
416  * MUST be called from the render thread
417  * @param inputFrameData Frame Data to process.
418  * @param params Processing params.
419  * @param recognizerIterations Number of processing iterations. Higher number means higher processing quality, but lower speed. Must be greater than 1. Pass null value for default number.
420  * @return Frame data with frame processing results.
421  */
422 - (nullable BNBFrameData *)processVideoFrameData:(nullable BNBFrameData *)inputFrameData
423  params:(nonnull BNBProcessImageParams *)params
424  recognizerIterations:(nullable NSNumber *)recognizerIterations;
425 
426 /**
427  * Provide frame to evaluate video processing.
428  * MUST be called from the render thread
429  * @param inputImage Image to process.
430  * @param params Processing params.
431  * @param recognizerIterations Number of processing iterations. Higher number means higher processing quality, but lower speed. Must be greater than 1. Pass null value for default number.
432  * @return Frame data with frame processing results.
433  */
434 - (nullable BNBFrameData *)processVideoFrame:(nonnull BNBFullImageData *)inputImage
435  params:(nonnull BNBProcessImageParams *)params
436  recognizerIterations:(nullable NSNumber *)recognizerIterations;
437 
438 /**
439  * Draw processed frame to image buffer.
440  * MUST be called from the render thread
441  * @param inputFrameData FrameData to draw.
442  * @param timeNs Frame position on timeline.
443  * @param outputPixelFormat Output image format.
444  * @return Buffer with processed image in selected format.
445  */
446 - (nonnull NSData *)drawVideoFrame:(nullable BNBFrameData *)inputFrameData
447  timeNs:(int64_t)timeNs
448  outputPixelFormat:(BNBPixelFormat)outputPixelFormat;
449 
450 /**
451  * The same as *draw_video_frame* but accepts preallocated buffer to avoid recreation for every frame.
452  * MUST be called from the render thread
453  */
454 - (nonnull NSData *)drawVideoFrameAllocated:(nullable BNBFrameData *)inputFrameData
455  timeNs:(int64_t)timeNs
456  outputPixelFormat:(BNBPixelFormat)outputPixelFormat
457  allocatedBuffer:(nonnull NSData *)allocatedBuffer;
458 
459 /** Thread-safe. May be called from any thread */
461 
462 /**
463  * Process recorded voice with voice changer effects mixing with recorded sounds.
464  * Copies in->out if no voice changer or effect is active.
465  * Not thread-safe but can be called from any thread.
466  * Recorded sounds have the same lifetime as the effect(e.g reset after load_effect, etc.).
467  * @param inFilename Input filename.
468  * @param outFilename Must have ".wav" extension.
469  * @param mixVolume Relative volume for mixing in sounds, [0..1].
470  */
471 - (void)processRecordedAudio:(nonnull NSString *)inFilename
472  outFilename:(nonnull NSString *)outFilename
473  mixVolume:(float)mixVolume;
474 
475 /**
476  * Save recorded audio.
477  * Not thread-safe but can be called from any thread.
478  * @param filename ".wav" extension must be used.
479  * @param lengthMs Track length. Set to '0' to use full duration.
480  */
481 - (void)writeRecordedAudio:(nonnull NSString *)filename
482  lengthMs:(int64_t)lengthMs;
483 
484 /**
485  * Trigger record start events in EP and Effect.
486  * Records all sounds during recording
487  * to be replayed by `processRecordedAudio`.
488  * If @param playAudioWhileRecording is true, the audio will continue to play. Otherwise, the audio will be muted.
489  * Thread-safe. May be called from any thread
490  */
491 - (void)onVideoRecordStart:(BOOL)playAudioWhileRecording;
492 
493 /**
494  * Triggers record stop events in EP and Effect.
495  * Thread-safe. May be called from any thread
496  */
497 - (void)onVideoRecordEnd;
498 
499 /**
500  * Check is device compatible with Neural Networks player
501  * Thread-safe. May be called from any thread
502  * On some platforms (e.g. Android) may require the first invocation to be on the render thread
503  */
504 - (BOOL)isDeviceNnCompatible;
505 
506 /**
507  * Request to start framedata capture process. Output file is in CBOR format.
508  * Thread-safe. May be called from any thread
509  * @param folder Output folder.
510  * @param filename Output filename. If the value is an empty string, filename is generated based on
511  * date and time.
512  */
513 - (void)startFramedataCapture:(nonnull NSString *)folder
514  filename:(nullable NSString *)filename;
515 
516 /** @see startFramedataCapture */
517 - (void)stopFramedataCapture;
518 
519 /**
520  * Request to start analytics capture process.
521  * Analytics supports two business cases:
522  * 1. Capture high resolution photo with face (bigger than 720p).
523  * 2. Capture N frames with face (N is configurable, if N=0 capturer will skip this case).
524  * Result is a path to CBOR file with images and face recognition results, compressed with zlib.
525  * Thread-safe. May be called from any thread
526  * @param deviceInfo Any user specific information to attach in analytics report.
527  * @param config Setup configurable properties (like frames counter and delay before capture).
528  * @param listener Callback which is fired in one of two above mentioned cases.
529  */
530 - (void)startAnalyticsCapture:(nonnull NSDictionary<NSString *, NSString *> *)deviceInfo
531  config:(nonnull BNBAnalyticsConfig *)config
532  listener:(nullable id<BNBAnalyticsListener>)listener;
533 
534 - (void)stopAnalyticsCapture;
535 
536 /**
537  * Get effect manager object
538  * Thread-safe. May be called from any thread
539  */
540 - (nullable BNBEffectManager *)effectManager;
541 
542 /** For internal usage only */
543 - (nullable BNBDebugInterface *)debugInterface;
544 
545 /**
546  * Force recognizer offline mode
547  * Thread-safe. May be called from any thread
548  */
549 - (void)setRecognizerOfflineMode:(BOOL)on;
550 
551 /**
552  * Change face search mode
553  * Thread-safe. May be called from any thread
554  */
555 - (void)setFaceSearchMode:(BNBFaceSearchMode)faceSearch;
556 
557 @end
-[BNBEffectPlayer effectManager]
nullable BNBEffectManager * effectManager()
Get effect manager object Thread-safe.
BNBPixelFormat.h
BNBAnalyticsConfig.h
BNBLowLightListener-p
internal
Definition: BNBLowLightListener.h:8
-[BNBEffectPlayer getCurrentScene]
nullable BNBScene * getCurrentScene()
If currently loaded effect is based on new Scene engine and it is loaded completly returns Scene obje...
-[BNBEffectPlayer debugInterface]
nullable BNBDebugInterface * debugInterface()
For internal usage only.
-[BNBEffectPlayer stopAnalyticsCapture]
void stopAnalyticsCapture()
BNBPixelRect
Definition: BNBPixelRect.h:7
-[BNBEffectPlayer draw]
int64_t draw()
Draw the current effect into the current OpenGL framebuffer.
BNBProcessImageParams
Definition: BNBProcessImageParams.h:8
BNBEffectInfoListener-p
Callback interface to receive effect info changes.
Definition: BNBEffectInfoListener.h:9
BNBFaceNumberListener-p
Callback to get face number detected.
Definition: BNBFaceNumberListener.h:8
BNBProcessImageParams.h
BNBConsistencyMode.h
-[BNBEffectPlayer playbackPlay]
void playbackPlay()
MUST be called from the main(render) thread.
BNBFrameDataListener-p
Callback to get freshly processed frame_data.
Definition: BNBFrameDataListener.h:9
BNBAnalyticsListener-p
internal
Definition: BNBAnalyticsListener.h:8
-[BNBEffectPlayer playbackStop]
void playbackStop()
BNBAnalyticsConfig
internal
Definition: BNBAnalyticsConfig.h:8
BNBFaceSearchMode.h
-[BNBEffectPlayer isDeviceNnCompatible]
BOOL isDeviceNnCompatible()
Check is device compatible with Neural Networks player Thread-safe.
BNBPixelRect.h
BNBEffectPlayer
The EffectPlayer class provides ability to play AR effects on set of images or video.
Definition: BNBEffectPlayer.h:78
BNBEffectPlayerConfiguration.h
BNBEffectPlayerConfiguration
Configuration for EffectPlayer.
Definition: BNBEffectPlayerConfiguration.h:10
-[BNBEffectPlayer stopFramedataCapture]
void stopFramedataCapture()
BNBCameraPoiListener-p
Callback to get center of square bounding the face.
Definition: BNBCameraPoiListener.h:8
-[BNBEffectPlayer onVideoRecordEnd]
void onVideoRecordEnd()
Triggers record stop events in EP and Effect.
BNBScene
A class representing a displayable scene.
Definition: BNBScene.h:17
+[BNBEffectPlayer versionMajor]
int32_t versionMajor()
Get major version of EffectPlayer.
-[BNBEffectPlayer playbackPause]
void playbackPause()
+[BNBEffectPlayer versionMinor]
int32_t versionMinor()
Get minor version of EffectPlayer.
BNBInputManager
Class to accepts touches from user.
Definition: BNBInputManager.h:14
BNBScene.h
BNBFrameDurationListener-p
Callback interface to receive FPS timings.
Definition: BNBFrameDurationListener.h:8
BNBEffectManager
Definition: BNBEffectManager.h:14
-[BNBEffectPlayer isVoiceChangerConfigured]
BOOL isVoiceChangerConfigured()
Thread-safe.
BNBCameraOrientation.h
-[BNBEffectPlayer surfaceDestroyed]
void surfaceDestroyed()
This method should be called right before an active context will become invalid.
-[BNBEffectPlayer getInputManager]
nullable BNBInputManager * getInputManager()
Get interface to control user iterations.
BNBDebugInterface
Definition: BNBDebugInterface.h:8
BNBFrameData.h
BNBFrameData
getters throw exceptions when data are not available android NNs usually output gpu masks
Definition: BNBFrameData.h:28
-[BNBEffectPlayer getPlaybackState]
BNBEffectPlayerPlaybackState getPlaybackState()
Thread-safe.
BNBEffectPlayerPlaybackState.h
BNBEffectActivationCompletionListener-p
Callback interface to receive effect activation notification.
Definition: BNBEffectActivationCompletionListener.h:8