Package com.banuba.sdk.effect_player
Interface Effect
- All Known Implementing Classes:
Effect.CppProxy
public interface Effect
-
Nested Class Summary
Nested Classes -
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.long
name()
void
reset()
Reset effect state MUST be called from the render threadstatus()
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 -
name
-
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 -
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
-
getNativeContext
long getNativeContext()
-