:: [Frei0r] [PATCH] Remove extra input…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Dan Dennedy
日付:  
To: Minimalistic plugin API for video effects
新しいトピック: Re: [Frei0r] [PATCH] Remove extra input params from C++ update() methods.
題目: [Frei0r] [PATCH] Remove extra input params from C++ update() methods.
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() {}