Package com.banuba.sdk.effect_player
Enum ConsistencyMode
- java.lang.Object
-
- java.lang.Enum<ConsistencyMode>
-
- com.banuba.sdk.effect_player.ConsistencyMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ConsistencyMode>
public enum ConsistencyMode extends java.lang.Enum<ConsistencyMode>
These modes describe the relationship between processing loop and render loop framesSynchronous - 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.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASYNCHRONOUS_CONSISTENT
ASYNCHRONOUS_CONSISTENT_WHEN_EFFECT_LOADED
switches to async-inconsistent mode while effect is loadingASYNCHRONOUS_INCONSISTENT
SYNCHRONOUS
SYNCHRONOUS_WHEN_EFFECT_LOADED
switches to async-inconsistent mode while effect is loading
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConsistencyMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ConsistencyMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SYNCHRONOUS
public static final ConsistencyMode SYNCHRONOUS
-
SYNCHRONOUS_WHEN_EFFECT_LOADED
public static final ConsistencyMode SYNCHRONOUS_WHEN_EFFECT_LOADED
switches to async-inconsistent mode while effect is loading
-
ASYNCHRONOUS_INCONSISTENT
public static final ConsistencyMode ASYNCHRONOUS_INCONSISTENT
-
ASYNCHRONOUS_CONSISTENT
public static final ConsistencyMode ASYNCHRONOUS_CONSISTENT
-
ASYNCHRONOUS_CONSISTENT_WHEN_EFFECT_LOADED
public static final ConsistencyMode ASYNCHRONOUS_CONSISTENT_WHEN_EFFECT_LOADED
switches to async-inconsistent mode while effect is loading
-
-
Method Detail
-
values
public static ConsistencyMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConsistencyMode c : ConsistencyMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConsistencyMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-