Package com.banuba.sdk.effect_player
Interface Effect
- All Known Implementing Classes:
Effect.CppProxy
public interface Effect
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(int fxWidth, int fxHeight, int surfaceWidth, int surfaceHeight) activate current effect MUST be called from the render thread for OpenGL backends.void
callJsMethod
(String methodName, String params) Call js method in effect.void
deserialize
(String resolvedUrl, String configOverride) Deserialize effect from the provided `resoved_url`.void
dump()
void
dumpJson()
void
evalJs
(String script, JsCallback resultCallback) Evaluate the `script` in effect.evalJsSync
(String script) Evaluate the `script` in effect.void
reset()
Reset effect state MUST be called from the render threadscene()
If effect is based on Scene engine and it is activated completly - returns Scene object from the effect.status()
void
update()
Update effect state (evaluate scheduled JS calls) MUST be called from the render threadurl()
Thread-safe.
-
Method Details
-
url
Thread-safe. May be called from any thread -
callJsMethod
Call js method in effect.- Parameters:
methodName
- JS global function name. Member functions are not supported.params
- Function arguments.
-
evalJs
Evaluate the `script` in effect. This method is thread safe.- Parameters:
sctipt
- JS string to executejs_callback
- Callback for result, will be called in render thread.
-
evalJsSync
Evaluate the `script` in effect. MUST be called from the render thread- Parameters:
sctipt
- JS string to execute- Returns:
- JS evaluation result
-
reset
void reset()Reset effect state MUST be called from the render thread -
update
void update()Update effect state (evaluate scheduled JS calls) MUST be called from the render thread -
scene
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
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. -
activate
void activate(int fxWidth, int fxHeight, int surfaceWidth, int surfaceHeight) activate current effect MUST be called from the render thread for OpenGL backends. -
dumpFs
-
dump
void dump() -
dumpJson
-
status
-