X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=effect.h;h=16b6cbb92149f7de70cf24d92d01a1182c8c343a;hb=8c7e53028a3ef4805d2608643041a5d7e6bd1b6e;hp=4f740f3cec0015910b4977642b1467570751c5e6;hpb=6602e2b9d5e5a44c0f075fe083ecc26feb10c173;p=movit diff --git a/effect.h b/effect.h index 4f740f3..16b6cbb 100644 --- a/effect.h +++ b/effect.h @@ -10,7 +10,7 @@ // effect instance; use the macro PREFIX() around your identifiers to // automatically prepend that prefix. -#include +#include #include #include #include @@ -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)