Banuba SDK
Loading...
Searching...
No Matches
consistency_mode.hpp File Reference
#include <functional>

Go to the source code of this file.

Enumerations

enum class  bnb::interfaces::consistency_mode : int {
  synchronous , synchronous_when_effect_loaded , asynchronous_inconsistent , asynchronous_consistent ,
  asynchronous_consistent_when_effect_loaded
}
 These modes describe the relationship between processing loop and render loop frames. More...
 

Enumeration Type Documentation

◆ consistency_mode

enum class bnb::interfaces::consistency_mode : int
strong

These modes describe the relationship between processing loop and render loop frames.

Synchronous - Asynchronous:


- Synchronous means to output (render) a frame only once after a new frame was fully processed
- Asynchronous may render multiple (not waiting for frx), further divided into Consistent and Inconsistent sub-modes. (note: Synchronous mode by definition is always Consistent.)

Consistent - Inconsistent:


- Consistent renders the processed frames as-is, the only change being in the advancement of time (e.g. animations, videos), while
- Inconsistent changes the camera image for that frame to the latest available (not yet processed), resulting in smoother rendering in case frx is slow or unsteady.

"Smart" modes:


There are modes with the "when effect loaded" suffix. These modes behave exactly the same as corresponding modes without such suffix, but only with one difference - they are activated only when the effect was completely loaded.
These modes can be used to avoid image freeze during effect activation.

Enumerator
synchronous_when_effect_loaded 

switches to async-inconsistent mode while effect is loading

asynchronous_consistent_when_effect_loaded 

switches to async-inconsistent mode while effect is loading

Definition at line 34 of file consistency_mode.hpp.

34 : int {
36 /** switches to async-inconsistent mode while effect is loading */
38 asynchronous_inconsistent,
39 asynchronous_consistent,
40 /** switches to async-inconsistent mode while effect is loading */
42};
@ synchronous_when_effect_loaded
switches to async-inconsistent mode while effect is loading
@ asynchronous_consistent_when_effect_loaded
switches to async-inconsistent mode while effect is loading
@ synchronous
Frame is processed only when pop_frame method called.