|
virtual std::string | url ()=0 |
| Thread-safe.
|
|
virtual void | call_js_method (const std::string &method_name, const std::string ¶ms)=0 |
| Call js method in effect.
|
|
virtual void | eval_js (const std::string &script, const std::shared_ptr< js_callback > &result_callback)=0 |
| Evaluate the script in effect.
|
|
virtual std::string | eval_js_sync (const std::string &script)=0 |
| Evaluate the script in effect.
|
|
virtual void | reset ()=0 |
| Reset effect state MUST be called from the render thread.
|
|
virtual void | update ()=0 |
| Update effect state (evaluate scheduled JS calls) MUST be called from the render thread.
|
|
virtual std::shared_ptr<::bnb::interfaces::scene > | scene ()=0 |
| If effect is based on Scene engine and it is activated completly - returns Scene object from the effect.
|
|
virtual void | deserialize (const std::string &resolved_url, const std::string &config_override)=0 |
| Deserialize effect from the provided resoved_url .
|
|
virtual void | activate (int32_t fx_width, int32_t fx_height, int32_t surface_width, int32_t surface_height)=0 |
| activate current effect MUST be called from the render thread for OpenGL backends.
|
|
virtual void | dump_fs (const std::string &out_dir)=0 |
|
virtual void | dump ()=0 |
|
virtual std::string | dump_json ()=0 |
|
virtual effect_status | status ()=0 |
|
Definition at line 21 of file effect.hpp.
◆ ~effect()
virtual bnb::interfaces::effect::~effect |
( |
| ) |
|
|
inlinevirtual |
◆ call_js_method()
virtual void bnb::interfaces::effect::call_js_method |
( |
const std::string & | method_name, |
|
|
const std::string & | params ) |
|
pure virtual |
Call js method in effect.
- Parameters
-
method_name | JS global function name. Member functions are not supported. |
params | Function arguments. @depreacted Use evalJs instead. |
◆ deserialize()
virtual void bnb::interfaces::effect::deserialize |
( |
const std::string & | resolved_url, |
|
|
const std::string & | config_override ) |
|
pure virtual |
Deserialize effect from the provided resoved_url
.
If config_override
is an empty string, will use config.json
under provided resolved_url
, otherwise content of config_override
will be used.
Can be called from any thread.
◆ eval_js()
virtual void bnb::interfaces::effect::eval_js |
( |
const std::string & | script, |
|
|
const std::shared_ptr< js_callback > & | result_callback ) |
|
pure virtual |
Evaluate the script
in effect.
This method is thread safe.
- Parameters
-
sctipt | JS string to execute |
js_callback | Callback for result, will be called in render thread. |
◆ eval_js_sync()
virtual std::string bnb::interfaces::effect::eval_js_sync |
( |
const std::string & | script | ) |
|
|
pure virtual |
Evaluate the script
in effect.
MUST be called from the render thread
- Parameters
-
sctipt | JS string to execute |
- Returns
- JS evaluation result
◆ scene()
virtual std::shared_ptr<::bnb::interfaces::scene > bnb::interfaces::effect::scene |
( |
| ) |
|
|
pure virtual |
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.
◆ url()
virtual std::string bnb::interfaces::effect::url |
( |
| ) |
|
|
pure virtual |
Thread-safe.
May be called from any thread
The documentation for this class was generated from the following file:
- /Users/itumashyk/Workspace/banuba_sdk/libs/effect_player/bnb/effect_player/interfaces/effect.hpp