:: Re: [Frei0r] [PATCH] Remove extra i…
Góra strony
Delete this message
Reply to this message
Autor: Dan Dennedy
Data:  
Dla: Minimalistic plugin API for video effects, salsaman@xs4all.nl
Stare tematy: [Frei0r] [PATCH] Remove extra input params from C++ update() methods.
Temat: Re: [Frei0r] [PATCH] Remove extra input params from C++ update() methods.
Jaromil asked me about this because we are preparing a new release, and we
decided to merge it into git master because the virtual function call only
occurs once per frame and is negligible.

Salsaman, as a reminder, this restores the update function signatures for
the C++ plugins as you had complained about a previous commit of mine. We
would really appreciate it if you can take a moment to run your LiVES test
script! Also, is that in a source repo somewhere in case others want to run
it after their changes?

On Sun, Apr 3, 2016 at 3:37 PM Dan Dennedy <dan@???> wrote:

> Here is the frei0r.hpp diff, the remainder is in the attachment. Since the
> diff lack
> --- include/frei0r.hpp
> +++ include/frei0r.hpp
> @@ -166,32 +166,62 @@ namespace frei0r
>    class source : public fx
>      {
>      protected:
>        source() {}

>
>      public:
>        virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_SOURCE; }
> +      virtual void update(double time, uint32_t* out) = 0;
> +
> +    private:
> +      virtual void update(double time,
> +                uint32_t* out,
> +                const uint32_t* in1,
> +                const uint32_t* in2,
> +                const uint32_t* in3) {
> +          update(time, out);
> +      }
>    };

>
>    class filter : public fx
>    {
>    protected:
>      filter() {}

>
>    public:
>      virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_FILTER; }
> +    virtual void update(double time, uint32_t* out, const uint32_t* in1)
> = 0;
> +
> +  private:
> +    virtual void update(double time,
> +              uint32_t* out,
> +              const uint32_t* in1,
> +              const uint32_t* in2,
> +              const uint32_t* in3) {
> +        update(time, out, in1);
> +    }
>    };

>
>    class mixer2 : public fx
>    {
>    protected:
>      mixer2() {}

>
>    public:
>      virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_MIXER2; }
> +    virtual void update(double time, uint32_t* out, const uint32_t* in1,
> const uint32_t* in2) = 0;
> +
> +  private:
> +    virtual void update(double time,
> +              uint32_t* out,
> +              const uint32_t* in1,
> +              const uint32_t* in2,
> +              const uint32_t* in3) {
> +        update(time, out, in1, in2);
> +    }
>    };

>
>
>    class mixer3 : public fx
>    {
>    protected:
>      mixer3() {}

>
>