TuttleOFX  1
TimeShiftPlugin.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_TIMESHIFT_PLUGIN_HPP_
00002 #define _TUTTLE_PLUGIN_TIMESHIFT_PLUGIN_HPP_
00003 
00004 #include <tuttle/plugin/ImageEffectGilPlugin.hpp>
00005 
00006 namespace tuttle {
00007 namespace plugin {
00008 namespace timeShift {
00009 
00010 template<typename Scalar>
00011 struct TimeShiftProcessParams
00012 {
00013         Scalar _offset;
00014 };
00015 
00016 /**
00017  * @brief TimeShift plugin
00018  */
00019 class TimeShiftPlugin : public ImageEffectGilPlugin
00020 {
00021 public:
00022         typedef float Scalar;
00023 public:
00024         TimeShiftPlugin( OfxImageEffectHandle handle );
00025 
00026 public:
00027         TimeShiftProcessParams<Scalar> getProcessParams() const;
00028 
00029         bool getTimeDomain( OfxRangeD& range );
00030         void getFramesNeeded( const OFX::FramesNeededArguments& args, OFX::FramesNeededSetter& frames );
00031         bool isIdentity( const OFX::RenderArguments& args, OFX::Clip*& identityClip, double& identityTime );
00032         void render( const OFX::RenderArguments& args );
00033 
00034 public:
00035         OFX::DoubleParam* _offset; ///< Time offset
00036 };
00037 
00038 }
00039 }
00040 }
00041 
00042 #endif