TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_SWSCALE_PLUGIN_HPP_ 00002 #define _TUTTLE_PLUGIN_SWSCALE_PLUGIN_HPP_ 00003 00004 #include "SwscaleDefinitions.hpp" 00005 00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp> 00007 #include <libav/LibAV.hpp> 00008 00009 namespace tuttle { 00010 namespace plugin { 00011 namespace swscale { 00012 00013 struct SwscaleProcessParams 00014 { 00015 EParamFilter _filter; 00016 int _sws_filter; 00017 }; 00018 00019 /** 00020 * @brief Swscale plugin 00021 */ 00022 class SwscalePlugin : public ImageEffectGilPlugin 00023 { 00024 public: 00025 typedef float Scalar; 00026 typedef boost::gil::point2<double> Point2; 00027 00028 public: 00029 SwscalePlugin( OfxImageEffectHandle handle ); 00030 00031 public: 00032 SwscaleProcessParams getProcessParams( const OfxPointD& renderScale = OFX::kNoRenderScale ) const; 00033 00034 void updateVisibleTools(); 00035 00036 void changedParam ( const OFX::InstanceChangedArgs &args, const std::string ¶mName ); 00037 00038 bool getRegionOfDefinition ( const OFX::RegionOfDefinitionArguments& args, OfxRectD& rod ); 00039 // void getRegionsOfInterest ( const OFX::RegionsOfInterestArguments& args, OFX::RegionOfInterestSetter& rois ); 00040 bool isIdentity ( const OFX::RenderArguments& args, OFX::Clip*& identityClip, double& identityTime ); 00041 00042 void render ( const OFX::RenderArguments &args ); 00043 00044 private: 00045 bool isIdentity() const; 00046 00047 public: 00048 OFX::ChoiceParam* _paramMode; 00049 00050 OFX::ChoiceParam* _paramFormat; 00051 00052 OFX::Int2DParam* _paramSize; 00053 OFX::IntParam* _paramSizeWidth; 00054 OFX::IntParam* _paramSizeHeight; 00055 OFX::BooleanParam* _paramSizeKeepRatio; 00056 OFX::ChoiceParam* _paramSizeOrientation; 00057 00058 OFX::Double2DParam* _paramScale; 00059 00060 OFX::ChoiceParam* _paramFilter; 00061 00062 }; 00063 00064 } 00065 } 00066 } 00067 00068 #endif