Class EffectManager.CppProxy

    • Method Detail

      • _djinni_private_destroy

        public void _djinni_private_destroy()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.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
      • createEffect

        public Effect createEffect​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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
      • getEffectInfo

        @NonNull
        public static EffectInfo getEffectInfo​(@NonNull
                                               java.lang.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