11#include <bnb/utils/defs.hpp>
16namespace bnb {
namespace interfaces {
19class effect_activated_listener;
20class effect_event_listener;
81 virtual std::shared_ptr<effect>
create_effect(
const std::string & work_dir)
const = 0;
93 virtual std::shared_ptr<effect>
load(
const std::string & url) = 0;
99 virtual std::shared_ptr<effect>
load_async(
const std::string & url) = 0;
109 virtual std::shared_ptr<reload_result>
reload_config(
const std::string & config) = 0;
129 virtual std::shared_ptr<effect>
current()
const = 0;
Interface to receive notifications on effect change.
Callback interface for effect events.
virtual::bnb::interfaces::size surface_size() const =0
Get current surface size Thread-safe.
virtual::bnb::interfaces::size effect_size() const =0
Get current effect size Thread-safe.
virtual void remove_effect_event_listener(const std::shared_ptr< effect_event_listener > &effect_event_listener)=0
Remove callback to receive events from effect.
virtual void add_hint_listener(const std::shared_ptr< hint_listener > &hint_listener)=0
Add callback to receive user-visible messages from effects.
virtual void unload(const std::shared_ptr< effect > &effect)=0
Unload effect from cache.
static effect_info get_effect_info(const std::string &url)
Get effect info.
virtual std::shared_ptr< effect > current() const =0
Get active effect Thread-safe.
virtual void add_effect_activated_listener(const std::shared_ptr< effect_activated_listener > &effect_activated_listener)=0
Add callback to receive notifications on effect change.
virtual void add_effect_event_listener(const std::shared_ptr< effect_event_listener > &effect_event_listener)=0
Add callback to receive events from effect.
virtual void remove_hint_listener(const std::shared_ptr< hint_listener > &hint_listener)=0
Remove callback to receive user-visible messages from effects.
virtual float effect_volume() const =0
Get effect audio volume.
virtual void add_error_listener(const std::shared_ptr< error_listener > &error_listener)=0
Add callback to receive errors messages from Effect Player.
virtual void remove_error_listener(const std::shared_ptr< error_listener > &error_listener)=0
Remove callback to receive errors messages from Effect Player.
virtual void set_effect_size(int32_t fx_width, int32_t fx_height)=0
Changes effect player render size, should be called on render thread.
virtual void set_current_effect(const std::shared_ptr< effect > &effect)=0
Set current effect.
virtual std::shared_ptr< reload_result > reload_config(const std::string &config)=0
Reload current effect config from the string provided.
virtual void set_render_surface(const surface_data &data)=0
set different render surfaces.
virtual void disable_surface_presentation()=0
disable surface presentation.
virtual std::shared_ptr< effect > load_async(const std::string &url)=0
Load effect async, activate in the draw() call when it will be ready.
virtual void remove_effect_activated_listener(const std::shared_ptr< effect_activated_listener > &effect_activated_listener)=0
Remove callback to receive notifications on effect change.
virtual void update(bool sync)=0
Update effect loading state.
virtual std::shared_ptr< effect > load(const std::string &url)=0
Load and activate effect sync.
virtual void set_effect_volume(float volume)=0
Set effect audio volume.
virtual std::shared_ptr< effect > create_effect(const std::string &work_dir) const =0
Create empty effect.
Interface to receive errors from EffectPlayer.
Callback to receive "hints" (e.g.
Data for creating surface.