Banuba SDK
consistency_mode.hpp
Go to the documentation of this file.
1 /// \file
2 /// \addtogroup EffectPlayer
3 /// @{
4 ///
5 // AUTOGENERATED FILE - DO NOT MODIFY!
6 // This file was generated by Djinni from effect_player.djinni
7 
8 #pragma once
9 
10 #include <functional>
11 
12 namespace bnb { namespace interfaces {
13 
14 /**
15  * These modes describe the relationship between processing loop and render loop frames
16  *
17  * <h3> Synchronous - Asynchronous:</h3>
18  * <br/> - Synchronous means to output (render) a frame only once after a new frame was fully processed
19  * <br/> - Asynchronous may render multiple (not waiting for frx), further divided into Consistent and
20  * Inconsistent sub-modes. (note: Synchronous mode by definition is always Consistent.)
21  *
22  * <h3>Consistent - Inconsistent:</h3>
23  * <br/> - Consistent renders the processed frames as-is, the only change being in the advancement of time
24  * (e.g. animations, videos), while
25  * <br/> - Inconsistent changes the camera image for that frame to the latest available (not yet processed),
26  * resulting in smoother rendering in case frx is slow or unsteady.
27  *
28  * <h3>"Smart" modes:</h3>
29  * <br/> There are modes with the "when effect loaded" suffix. These modes behave exactly the same as
30  * corresponding modes without such suffix, but only with one difference - they are activated only
31  * when the effect was completely loaded.
32  * <br/> These modes can be used to avoid image freeze during effect activation.
33  */
34 enum class consistency_mode : int {
35  synchronous,
36  /** switches to async-inconsistent mode while effect is loading */
37  synchronous_when_effect_loaded,
38  asynchronous_inconsistent,
39  asynchronous_consistent,
40  /** switches to async-inconsistent mode while effect is loading */
41  asynchronous_consistent_when_effect_loaded,
42 };
43 
44 } } // namespace bnb::interfaces
45 
46 namespace std {
47 
48 template <>
49 struct hash<::bnb::interfaces::consistency_mode> {
50  size_t operator()(::bnb::interfaces::consistency_mode type) const {
51  return std::hash<int>()(static_cast<int>(type));
52  }
53 };
54 
55 } // namespace std
56 /// @}
57 
bnb::interfaces::consistency_mode
consistency_mode
These modes describe the relationship between processing loop and render loop frames.
Definition: consistency_mode.hpp:34