Class EffectManager.CppProxy

java.lang.Object
com.banuba.sdk.effect_player.EffectManager.CppProxy
All Implemented Interfaces:
EffectManager
Enclosing interface:
EffectManager

public static final class EffectManager.CppProxy extends Object implements EffectManager
  • Method Details

    • _djinni_private_destroy

      public void _djinni_private_destroy()
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • addErrorListener

      public void addErrorListener(ErrorListener errorListener)
      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 interface EffectManager
    • removeErrorListener

      public void removeErrorListener(ErrorListener errorListener)
      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 interface EffectManager
    • addHintListener

      public void addHintListener(HintListener hintListener)
      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 interface EffectManager
    • removeHintListener

      public void removeHintListener(HintListener hintListener)
      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 interface EffectManager
    • addEffectEventListener

      public void addEffectEventListener(EffectEventListener effectEventListener)
      Description copied from interface: EffectManager
      Add callback to receive events from effect. Thread-safe. May be called from any thread
      Specified by:
      addEffectEventListener in interface EffectManager
    • removeEffectEventListener

      public void removeEffectEventListener(EffectEventListener effectEventListener)
      Description copied from interface: EffectManager
      Remove callback to receive events from effect. Thread-safe. May be called from any thread
      Specified by:
      removeEffectEventListener in interface EffectManager
    • addEffectActivatedListener

      public void addEffectActivatedListener(EffectActivatedListener effectActivatedListener)
      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 interface EffectManager
    • removeEffectActivatedListener

      public void removeEffectActivatedListener(EffectActivatedListener effectActivatedListener)
      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 interface EffectManager
    • createEffect

      public Effect createEffect(String workDir)
      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 interface EffectManager
    • setCurrentEffect

      public void setCurrentEffect(Effect effect)
      Description copied from interface: EffectManager
      Set current effect. Thread-safe. May be called from any thread
      Specified by:
      setCurrentEffect in interface EffectManager
    • load

      public Effect load(String url)
      Description copied from interface: EffectManager
      Load and activate effect sync. MUST be called from the render thread.
      Specified by:
      load in interface EffectManager
    • loadAsync

      public Effect loadAsync(String url)
      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 interface EffectManager
    • reloadConfig

      public ReloadResult reloadConfig(String config)
      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 interface EffectManager
    • unload

      public void unload(Effect effect)
      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 interface EffectManager
    • current

      public Effect current()
      Description copied from interface: EffectManager
      Get active effect Thread-safe. May be called from any thread
      Specified by:
      current in interface EffectManager
    • update

      public void update(boolean sync)
      Description copied from interface: EffectManager
      Update effect loading state
      Specified by:
      update in interface EffectManager
      Parameters:
      sync - syncronize effect manager, block until effect loaded MUST be called from the render thread
    • effectSize

      public Size effectSize()
      Description copied from interface: EffectManager
      Get current effect size Thread-safe. May be called from any thread
      Specified by:
      effectSize in interface EffectManager
    • surfaceSize

      public Size surfaceSize()
      Description copied from interface: EffectManager
      Get current surface size Thread-safe. May be called from any thread
      Specified by:
      surfaceSize in interface EffectManager
    • 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 interface EffectManager
      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 interface EffectManager
      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 interface EffectManager
    • setRenderSurface

      public void setRenderSurface(SurfaceData data)
      Description copied from interface: EffectManager
      set different render surfaces. Can be treated as void*
      Specified by:
      setRenderSurface in interface EffectManager
    • disableSurfacePresentation

      public void disableSurfacePresentation()
      Description copied from interface: EffectManager
      disable surface presentation. Needed for offscreen rendering
      Specified by:
      disableSurfacePresentation in interface EffectManager
    • getEffectInfo

      @NonNull public static EffectInfo getEffectInfo(@NonNull String url)
      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