X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect.h;h=ce07df472e46327a45e0533650bd98163638232b;hp=4f740f3cec0015910b4977642b1467570751c5e6;hb=a7bc6c9c002f26b0bb781a3475774eba5dab6acf;hpb=6602e2b9d5e5a44c0f075fe083ecc26feb10c173 diff --git a/effect.h b/effect.h index 4f740f3..ce07df4 100644 --- a/effect.h +++ b/effect.h @@ -18,6 +18,8 @@ #include "defs.h" +namespace movit { + class EffectChain; class Node; @@ -196,6 +198,12 @@ public: // if you have several, they will be INPUT1(), INPUT2(), and so on. virtual unsigned num_inputs() const { return 1; } + // Inform the effect that it has been just added to the EffectChain. + // The primary use for this is to store the ResourcePool uesd by + // the chain; for modifications to it, rewrite_graph() below + // is probably a better fit. + virtual void inform_added(EffectChain *chain) {} + // Let the effect rewrite the effect chain as it sees fit. // Most effects won't need to do this, but this is very useful // if you have an effect that consists of multiple sub-effects @@ -265,4 +273,6 @@ private: std::map params_vec4; }; +} // namespace movit + #endif // !defined(_MOVIT_EFFECT_H)