#ifndef HOST_DEMO_CLIP_INSTANCE_H
#define HOST_DEMO_CLIP_INSTANCE_H
#define OFXHOSTDEMOCLIPLENGTH 1.0
namespace MyHost {
class MyClipInstance;
class MyImage : public OFX::Host::ImageEffect::Image
{
protected :
OfxRGBAColourB *_data; public :
explicit MyImage(MyClipInstance &clip, OfxTime t, int view = 0);
OfxRGBAColourB* pixel(int x, int y) const;
~MyImage();
};
class MyClipInstance : public OFX::Host::ImageEffect::ClipInstance {
protected:
MyEffectInstance *_effect;
std::string _name;
MyImage *_outputImage;
public:
MyClipInstance(MyEffectInstance* effect, OFX::Host::ImageEffect::ClipDescriptor* desc);
virtual ~MyClipInstance();
MyImage* getOutputImage() { return _outputImage; }
const std::string &getUnmappedBitDepth() const;
virtual const std::string &getUnmappedComponents() const;
virtual const std::string &getPremult() const;
virtual double getAspectRatio() const;
virtual double getFrameRate() const;
virtual void getFrameRange(double &startFrame, double &endFrame) const ;
virtual const std::string &getFieldOrder() const;
virtual bool getConnected() const;
virtual double getUnmappedFrameRate() const;
virtual void getUnmappedFrameRange(double &unmappedStartFrame, double &unmappedEndFrame) const;
virtual bool getContinuousSamples() const;
virtual OFX::Host::ImageEffect::Image* getImage(OfxTime time, const OfxRectD *optionalBounds);
#ifdef OFX_SUPPORTS_OPENGLRENDER
virtual OFX::Host::ImageEffect::Texture* loadTexture(OfxTime time, const char *format, const OfxRectD *optionalBounds) { return NULL; };
#endif
virtual OfxRectD getRegionOfDefinition(OfxTime time) const;
};
}
#endif