Package com.banuba.sdk.effect_player
Class Effect.CppProxy
- java.lang.Object
-
- com.banuba.sdk.effect_player.Effect.CppProxy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.banuba.sdk.effect_player.Effect
Effect.CppProxy
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_djinni_private_destroy()
void
activate(int fxWidth, int fxHeight, int surfaceWidth, int surfaceHeight)
activate current effect MUST be called from the render thread for OpenGL backends.void
callJsMethod(java.lang.String methodName, java.lang.String params)
Call js method in effect.void
deserialize(java.lang.String resolvedUrl, java.lang.String configOverride)
Deserialize effect from the provided `resoved_url`.void
dump()
void
dumpFs(java.lang.String outDir)
java.lang.String
dumpJson()
void
evalJs(java.lang.String script, JsCallback resultCallback)
Evaluate the `script` in effect.java.lang.String
evalJsSync(java.lang.String script)
Evaluate the `script` in effect.protected void
finalize()
void
reset()
Reset effect state MUST be called from the render threadScene
scene()
If effect is based on Scene engine and it is activated completly - returns Scene object from the effect.EffectStatus
status()
void
update()
Update effect state (evaluate scheduled JS calls) MUST be called from the render threadjava.lang.String
url()
Thread-safe.
-
-
-
Method Detail
-
_djinni_private_destroy
public void _djinni_private_destroy()
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
url
public java.lang.String url()
Description copied from interface:Effect
Thread-safe. May be called from any thread
-
callJsMethod
public void callJsMethod(java.lang.String methodName, java.lang.String params)
Description copied from interface:Effect
Call js method in effect.- Specified by:
callJsMethod
in interfaceEffect
- Parameters:
methodName
- JS global function name. Member functions are not supported.params
- Function arguments.
-
evalJs
public void evalJs(java.lang.String script, JsCallback resultCallback)
Description copied from interface:Effect
Evaluate the `script` in effect. This method is thread safe.
-
evalJsSync
public java.lang.String evalJsSync(java.lang.String script)
Description copied from interface:Effect
Evaluate the `script` in effect. MUST be called from the render thread- Specified by:
evalJsSync
in interfaceEffect
- Returns:
- JS evaluation result
-
reset
public void reset()
Description copied from interface:Effect
Reset effect state MUST be called from the render thread
-
update
public void update()
Description copied from interface:Effect
Update effect state (evaluate scheduled JS calls) MUST be called from the render thread
-
scene
public Scene scene()
Description copied from interface:Effect
If effect is based on Scene engine and it is activated completly - returns Scene object from the effect. Otherwise returns null. MUST be called from the render thread Returned Scene object MUST be used only from the render thread and only while the effect is in the activated state.
-
deserialize
public void deserialize(java.lang.String resolvedUrl, java.lang.String configOverride)
Description copied from interface:Effect
Deserialize effect from the provided `resoved_url`. If `configOverride` is an empty string, will use `config.json` under provided `resolvedUrl`, otherwise content of `configOverride` will be used. Can be called from any thread.- Specified by:
deserialize
in interfaceEffect
-
activate
public void activate(int fxWidth, int fxHeight, int surfaceWidth, int surfaceHeight)
Description copied from interface:Effect
activate current effect MUST be called from the render thread for OpenGL backends.
-
status
public EffectStatus status()
-
-