Banuba SDK
effect.hpp
Go to the documentation of this file.
1 /// \file
2 /// \addtogroup EffectPlayer
3 /// @{
4 ///
5 // AUTOGENERATED FILE - DO NOT MODIFY!
6 // This file generated by Djinni from effect_player.djinni
7 
8 #pragma once
9 
10 #include <bnb/utils/defs.hpp>
11 #include <string>
12 
13 namespace bnb { namespace interfaces {
14 
15 class BNB_EXPORT effect {
16 public:
17  virtual ~effect() {}
18 
19  /** Thread-safe. May be called from any thread */
20  virtual std::string url() = 0;
21 
22  /**
23  * Adds js method call to call queue. Queue is performed during the *draw* operation.
24  * If there is an effect in loading state, all calls will be performed
25  * when the effect loading is finished.
26  * Thread-safe. May be called from any thread
27  * @param method_name JS global function name. Member functions are not supported.
28  * @param params Function arguments as JSON string.
29  */
30  virtual void call_js_method(const std::string & method_name, const std::string & params) = 0;
31 
32  /**
33  * reset effect state
34  * MUST be called from the render thread
35  */
36  virtual void reset() = 0;
37 };
38 
39 } } // namespace bnb::interfaces
40 /// @}
41 
bnb::interfaces::effect::url
virtual std::string url()=0
Thread-safe.
bnb::interfaces::effect::reset
virtual void reset()=0
reset effect state MUST be called from the render thread
bnb::interfaces::effect
Definition: effect.hpp:15
bnb::interfaces::effect::call_js_method
virtual void call_js_method(const std::string &method_name, const std::string &params)=0
Adds js method call to call queue.