Package com.banuba.sdk.effect_player
Class EffectManager.CppProxy
java.lang.Object
com.banuba.sdk.effect_player.EffectManager.CppProxy
- All Implemented Interfaces:
EffectManager
- Enclosing interface:
- EffectManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.banuba.sdk.effect_player.EffectManager
EffectManager.CppProxy
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addEffectActivatedListener
(EffectActivatedListener effectActivatedListener) Add callback to receive notifications on effect change.void
addEffectEventListener
(EffectEventListener effectEventListener) Add callback to receive events from effect.void
addErrorListener
(ErrorListener errorListener) Add callback to receive errors messages from Effect Player.void
addHintListener
(HintListener hintListener) Add callback to receive user-visible messages from effects.createEffect
(String workDir) Create empty effect.current()
Get active effect Thread-safe.void
disable surface presentation.Get current effect size Thread-safe.float
Get effect audio volume.protected void
finalize()
static EffectInfo
getEffectInfo
(String url) Get effect info.Load and activate effect sync.Load effect async, activate in the draw() call when it will be ready.reloadConfig
(String config) Reload current effect config from the string provided.void
removeEffectActivatedListener
(EffectActivatedListener effectActivatedListener) Remove callback to receive notifications on effect change.void
removeEffectEventListener
(EffectEventListener effectEventListener) Remove callback to receive events from effect.void
removeErrorListener
(ErrorListener errorListener) Remove callback to receive errors messages from Effect Player.void
removeHintListener
(HintListener hintListener) Remove callback to receive user-visible messages from effects.void
setCurrentEffect
(Effect effect) Set current effect.void
setEffectSize
(int fxWidth, int fxHeight) Changes effect player render size, should be called on render thread.void
setEffectVolume
(float volume) Set effect audio volume.void
setRenderSurface
(SurfaceData data) set different render surfaces.Get current surface size Thread-safe.void
Unload effect from cache.void
update
(boolean sync) Update effect loading state
-
Method Details
-
_djinni_private_destroy
public void _djinni_private_destroy() -
finalize
-
addErrorListener
Description copied from interface:EffectManager
Add callback to receive errors messages from Effect Player. Thread-safe. May be called from any thread- Specified by:
addErrorListener
in interfaceEffectManager
-
removeErrorListener
Description copied from interface:EffectManager
Remove callback to receive errors messages from Effect Player. Thread-safe. May be called from any thread- Specified by:
removeErrorListener
in interfaceEffectManager
-
addHintListener
Description copied from interface:EffectManager
Add callback to receive user-visible messages from effects. You should display them on UI. Thread-safe. May be called from any thread- Specified by:
addHintListener
in interfaceEffectManager
-
removeHintListener
Description copied from interface:EffectManager
Remove callback to receive user-visible messages from effects. Thread-safe. May be called from any thread- Specified by:
removeHintListener
in interfaceEffectManager
-
addEffectEventListener
Description copied from interface:EffectManager
Add callback to receive events from effect. Thread-safe. May be called from any thread- Specified by:
addEffectEventListener
in interfaceEffectManager
-
removeEffectEventListener
Description copied from interface:EffectManager
Remove callback to receive events from effect. Thread-safe. May be called from any thread- Specified by:
removeEffectEventListener
in interfaceEffectManager
-
addEffectActivatedListener
Description copied from interface:EffectManager
Add callback to receive notifications on effect change. Thread-safe. May be called from any thread- Specified by:
addEffectActivatedListener
in interfaceEffectManager
-
removeEffectActivatedListener
Description copied from interface:EffectManager
Remove callback to receive notifications on effect change. Thread-safe. May be called from any thread- Specified by:
removeEffectActivatedListener
in interfaceEffectManager
-
createEffect
Description copied from interface:EffectManager
Create empty effect. If working directory path is empty string then effect assumed as an in-memory effect.- Specified by:
createEffect
in interfaceEffectManager
-
setCurrentEffect
Description copied from interface:EffectManager
Set current effect. Thread-safe. May be called from any thread- Specified by:
setCurrentEffect
in interfaceEffectManager
-
load
Description copied from interface:EffectManager
Load and activate effect sync. MUST be called from the render thread.- Specified by:
load
in interfaceEffectManager
-
loadAsync
Description copied from interface:EffectManager
Load effect async, activate in the draw() call when it will be ready. Thread-safe. May be called from any thread.- Specified by:
loadAsync
in interfaceEffectManager
-
reloadConfig
Description copied from interface:EffectManager
Reload current effect config from the string provided. If this reload is possible without effect recreation, this method will return `hot_reload == true`, otherwise `current` effect will be replaced and the method will return `hot_reload == false`. Thread-safe. May be called from any thread.- Specified by:
reloadConfig
in interfaceEffectManager
-
unload
Description copied from interface:EffectManager
Unload effect from cache. if no currently loading effect - works the same way as load(""); launches empty effect loading. MUST be called from the render thread- Specified by:
unload
in interfaceEffectManager
-
current
Description copied from interface:EffectManager
Get active effect Thread-safe. May be called from any thread- Specified by:
current
in interfaceEffectManager
-
update
public void update(boolean sync) Description copied from interface:EffectManager
Update effect loading state- Specified by:
update
in interfaceEffectManager
- Parameters:
sync
- syncronize effect manager, block until effect loaded MUST be called from the render thread
-
effectSize
Description copied from interface:EffectManager
Get current effect size Thread-safe. May be called from any thread- Specified by:
effectSize
in interfaceEffectManager
-
surfaceSize
Description copied from interface:EffectManager
Get current surface size Thread-safe. May be called from any thread- Specified by:
surfaceSize
in interfaceEffectManager
-
effectVolume
public float effectVolume()Description copied from interface:EffectManager
Get effect audio volume. Thread-safe. May be called from any thread- Specified by:
effectVolume
in interfaceEffectManager
- Returns:
- A volume in range `[0, 1]`, where `1` means maximum volume.
-
setEffectVolume
public void setEffectVolume(float volume) Description copied from interface:EffectManager
Set effect audio volume. Thread-safe. May be called from any thread- Specified by:
setEffectVolume
in interfaceEffectManager
- Parameters:
volume
- A value in range `[0, 1]`, where `1` means maximum volume.
-
setEffectSize
public void setEffectSize(int fxWidth, int fxHeight) Description copied from interface:EffectManager
Changes effect player render size, should be called on render thread. MUST be called from the render thread- Specified by:
setEffectSize
in interfaceEffectManager
-
setRenderSurface
Description copied from interface:EffectManager
set different render surfaces. Can be treated as void*- Specified by:
setRenderSurface
in interfaceEffectManager
-
disableSurfacePresentation
public void disableSurfacePresentation()Description copied from interface:EffectManager
disable surface presentation. Needed for offscreen rendering- Specified by:
disableSurfacePresentation
in interfaceEffectManager
-
getEffectInfo
Description copied from interface:EffectManager
Get effect info. May be called before loading effect "render type" and "recognizer features" fields won't be filled Thread-safe. May be called from any thread
-