Banuba SDK
Loading...
Searching...
No Matches
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
12namespace 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 */
34enum class consistency_mode : 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};
43
44} } // namespace bnb::interfaces
45
46namespace std {
47
48template <>
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
consistency_mode
These modes describe the relationship between processing loop and render loop frames.
@ 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.