TuttleOFX
1
|
InputBuffer plugin. More...
#include <InputBufferPlugin.hpp>
InputBuffer plugin.
Definition at line 37 of file InputBufferPlugin.hpp.
typedef float tuttle::plugin::inputBuffer::InputBufferPlugin::Scalar |
Definition at line 40 of file InputBufferPlugin.hpp.
tuttle::plugin::inputBuffer::InputBufferPlugin::InputBufferPlugin | ( | OfxImageEffectHandle | handle | ) |
Definition at line 61 of file InputBufferPlugin.cpp.
References _callbackMode_imgPointer, _callbackMode_imgSize, _callbackMode_rowSizeBytes, _callbackMode_time, _clipDst, _paramBitDepth, _paramField, _paramFramerate, _paramInputBufferPointer, _paramInputCallbackCustomData, _paramInputCallbackDestroyCustomData, _paramInputCallbackPointer, _paramInputMode, _paramOrientation, _paramPixelAspectRatio, _paramPixelComponents, _paramRowByteSize, _paramSize, _paramTimeDomain, changedParam(), OFX::ParamSet::fetchChoiceParam(), OFX::ImageEffect::fetchClip(), OFX::ParamSet::fetchDouble2DParam(), OFX::ParamSet::fetchDoubleParam(), OFX::ParamSet::fetchInt2DParam(), OFX::ParamSet::fetchIntParam(), OFX::ParamSet::fetchStringParam(), kOfxImageEffectOutputClipName, tuttle::plugin::inputBuffer::kParamBitDepth, tuttle::plugin::inputBuffer::kParamField, tuttle::plugin::inputBuffer::kParamFramerate, tuttle::plugin::inputBuffer::kParamInputBufferPointer, tuttle::plugin::inputBuffer::kParamInputCallbackDestroyCustomData, tuttle::plugin::inputBuffer::kParamInputCallbackPointer, tuttle::plugin::inputBuffer::kParamInputCustomData, tuttle::plugin::inputBuffer::kParamInputMode, tuttle::plugin::inputBuffer::kParamOrientation, tuttle::plugin::inputBuffer::kParamPixelAspectRatio, tuttle::plugin::inputBuffer::kParamPixelComponents, tuttle::plugin::inputBuffer::kParamRowBytesSize, tuttle::plugin::inputBuffer::kParamSize, tuttle::plugin::inputBuffer::kParamTimeDomain, OfxPointI::x, and OfxPointI::y.
tuttle::plugin::inputBuffer::InputBufferPlugin::~InputBufferPlugin | ( | ) |
Definition at line 93 of file InputBufferPlugin.cpp.
void tuttle::plugin::inputBuffer::InputBufferPlugin::callbackMode_updateImage | ( | const OfxTime | time, |
const InputBufferProcessParams & | params | ||
) | [private] |
We call this function each time we need to know something about the image, the size, the buffer, etc. And this function ensures to get valid values, and is responsible to call the callback only once for a given input time.
Definition at line 234 of file InputBufferPlugin.cpp.
References _callbackMode_imgPointer, _callbackMode_imgSize, _callbackMode_rowSizeBytes, _callbackMode_time, tuttle::plugin::inputBuffer::InputBufferProcessParams::_callbackPtr, tuttle::plugin::inputBuffer::InputBufferProcessParams::_customDataPtr, OfxPointI::x, and OfxPointI::y.
Referenced by getRegionOfDefinition(), and render().
void tuttle::plugin::inputBuffer::InputBufferPlugin::changedParam | ( | const OFX::InstanceChangedArgs & | args, |
const std::string & | paramName | ||
) | [virtual] |
called when a param has just had its value changed
Reimplemented from OFX::ImageEffect.
Definition at line 159 of file InputBufferPlugin.cpp.
References tuttle::plugin::inputBuffer::InputBufferProcessParams::_callbackDestroyPtr, _paramInputBufferPointer, _paramInputCallbackCustomData, _paramInputCallbackPointer, _paramInputMode, _tempStoreCustomDataPtr, tuttle::plugin::inputBuffer::eParamInputModeBufferPointer, tuttle::plugin::inputBuffer::eParamInputModeCallbackPointer, getProcessParams(), OFX::StringParam::getValue(), OFX::ChoiceParam::getValue(), tuttle::plugin::inputBuffer::kParamInputBufferPointer, tuttle::plugin::inputBuffer::kParamInputCallbackPointer, tuttle::plugin::inputBuffer::kParamInputCustomData, tuttle::plugin::inputBuffer::kParamInputMode, OFX::Param::setIsSecretAndDisabled(), OFX::ChoiceParam::setValue(), tuttle::plugin::memoryBuffer::stringToPointer(), and OFX::InstanceChangedArgs::time.
Referenced by InputBufferPlugin().
void tuttle::plugin::inputBuffer::InputBufferPlugin::getClipPreferences | ( | OFX::ClipPreferencesSetter & | clipPreferences | ) | [virtual] |
get the clip preferences
Reimplemented from OFX::ImageEffect.
Definition at line 193 of file InputBufferPlugin.cpp.
References tuttle::plugin::inputBuffer::InputBufferProcessParams::_bitDepth, _clipDst, tuttle::plugin::inputBuffer::InputBufferProcessParams::_field, tuttle::plugin::inputBuffer::InputBufferProcessParams::_framerate, tuttle::plugin::inputBuffer::InputBufferProcessParams::_mode, _paramTimeDomain, tuttle::plugin::inputBuffer::InputBufferProcessParams::_pixelAspectRatio, tuttle::plugin::inputBuffer::InputBufferProcessParams::_pixelComponents, tuttle::plugin::inputBuffer::eParamInputModeCallbackPointer, getProcessParams(), OFX::Double2DParam::getValue(), OfxRangeD::max, OfxRangeD::min, OFX::ClipPreferencesSetter::setClipBitDepth(), OFX::ClipPreferencesSetter::setClipComponents(), OFX::ClipPreferencesSetter::setOutputFielding(), OFX::ClipPreferencesSetter::setOutputFrameRate(), OFX::ClipPreferencesSetter::setOutputFrameVarying(), and OFX::ClipPreferencesSetter::setPixelAspectRatio().
InputBufferProcessParams tuttle::plugin::inputBuffer::InputBufferPlugin::getProcessParams | ( | const OfxTime | time | ) | const |
Definition at line 97 of file InputBufferPlugin.cpp.
References tuttle::plugin::inputBuffer::InputBufferProcessParams::_bitDepth, tuttle::plugin::inputBuffer::InputBufferProcessParams::_callbackDestroyPtr, tuttle::plugin::inputBuffer::InputBufferProcessParams::_callbackPtr, tuttle::plugin::inputBuffer::InputBufferProcessParams::_customDataPtr, tuttle::plugin::inputBuffer::InputBufferProcessParams::_field, tuttle::plugin::inputBuffer::InputBufferProcessParams::_framerate, tuttle::plugin::inputBuffer::InputBufferProcessParams::_height, tuttle::plugin::inputBuffer::InputBufferProcessParams::_inputBuffer, tuttle::plugin::inputBuffer::InputBufferProcessParams::_mode, tuttle::plugin::inputBuffer::InputBufferProcessParams::_orientation, _paramBitDepth, _paramField, _paramFramerate, _paramInputBufferPointer, _paramInputCallbackCustomData, _paramInputCallbackDestroyCustomData, _paramInputCallbackPointer, _paramInputMode, _paramOrientation, _paramPixelAspectRatio, _paramPixelComponents, _paramRowByteSize, _paramSize, tuttle::plugin::inputBuffer::InputBufferProcessParams::_pixelAspectRatio, tuttle::plugin::inputBuffer::InputBufferProcessParams::_pixelComponents, tuttle::plugin::inputBuffer::InputBufferProcessParams::_rowByteSize, tuttle::plugin::inputBuffer::InputBufferProcessParams::_width, OFX::eBitDepthFloat, OFX::eBitDepthUByte, OFX::eBitDepthUShort, OFX::eFieldBoth, OFX::eFieldLower, OFX::eFieldNone, OFX::eFieldUpper, tuttle::plugin::inputBuffer::eParamBitDepthFloat, tuttle::plugin::inputBuffer::eParamBitDepthUByte, tuttle::plugin::inputBuffer::eParamBitDepthUShort, tuttle::plugin::inputBuffer::eParamFieldBoth, tuttle::plugin::inputBuffer::eParamFieldLower, tuttle::plugin::inputBuffer::eParamFieldNone, tuttle::plugin::inputBuffer::eParamFieldUpper, tuttle::plugin::inputBuffer::eParamPixelComponentAlpha, tuttle::plugin::inputBuffer::eParamPixelComponentRGB, tuttle::plugin::inputBuffer::eParamPixelComponentRGBA, OFX::ePixelComponentAlpha, OFX::ePixelComponentRGB, OFX::ePixelComponentRGBA, OFX::DoubleParam::getValue(), OFX::StringParam::getValue(), OFX::ChoiceParam::getValue(), OFX::IntParam::getValueAtTime(), OFX::Int2DParam::getValueAtTime(), OFX::StringParam::getValueAtTime(), tuttle::plugin::memoryBuffer::stringToPointer(), OfxPointI::x, and OfxPointI::y.
Referenced by changedParam(), getClipPreferences(), getRegionOfDefinition(), and render().
bool tuttle::plugin::inputBuffer::InputBufferPlugin::getRegionOfDefinition | ( | const OFX::RegionOfDefinitionArguments & | args, |
OfxRectD & | rod | ||
) | [virtual] |
The get RoD action.
If the effect wants change the rod from the default value (which is the union of RoD's of all input clips) it should set the rod argument and return true.
This is all in cannonical coordinates.
Reimplemented from OFX::ImageEffect.
Definition at line 207 of file InputBufferPlugin.cpp.
References _callbackMode_imgSize, tuttle::plugin::inputBuffer::InputBufferProcessParams::_mode, _paramSize, callbackMode_updateImage(), tuttle::plugin::inputBuffer::eParamInputModeBufferPointer, tuttle::plugin::inputBuffer::eParamInputModeCallbackPointer, getProcessParams(), OFX::Int2DParam::getValueAtTime(), OFX::RegionOfDefinitionArguments::time, OfxPointI::x, OfxRectD::x1, OfxRectD::x2, OfxPointI::y, OfxRectD::y1, and OfxRectD::y2.
bool tuttle::plugin::inputBuffer::InputBufferPlugin::getTimeDomain | ( | OfxRangeD & | range | ) | [virtual] |
what is the time domain of this effect, valid only in the general context
get the time domain
return true if range was set, otherwise the default (the union of the time domain of all input clips) is used
Reimplemented from OFX::ImageEffect.
Definition at line 187 of file InputBufferPlugin.cpp.
References _paramTimeDomain, OFX::Double2DParam::getValue(), OfxRangeD::max, and OfxRangeD::min.
void tuttle::plugin::inputBuffer::InputBufferPlugin::render | ( | const OFX::RenderArguments & | args | ) | [virtual] |
The overridden render function.
[in] | args | Rendering parameters |
Implements OFX::ImageEffect.
Definition at line 256 of file InputBufferPlugin.cpp.
References tuttle::plugin::inputBuffer::InputBufferProcessParams::_bitDepth, tuttle::plugin::inputBuffer::InputBufferProcessParams::_callbackDestroyPtr, _callbackMode_imgPointer, _callbackMode_rowSizeBytes, _clipDst, tuttle::plugin::inputBuffer::InputBufferProcessParams::_customDataPtr, tuttle::plugin::inputBuffer::InputBufferProcessParams::_inputBuffer, tuttle::plugin::inputBuffer::InputBufferProcessParams::_mode, tuttle::plugin::inputBuffer::InputBufferProcessParams::_orientation, tuttle::plugin::inputBuffer::InputBufferProcessParams::_pixelComponents, tuttle::plugin::inputBuffer::InputBufferProcessParams::_rowByteSize, tuttle::ofx::imageEffect::bitDepthMemorySize(), callbackMode_updateImage(), tuttle::plugin::inputBuffer::eParamInputModeBufferPointer, tuttle::plugin::inputBuffer::eParamInputModeCallbackPointer, tuttle::plugin::inputBuffer::eParamOrientationFromBottomToTop, tuttle::plugin::inputBuffer::eParamOrientationFromTopToBottom, OFX::Clip::fetchImage(), OFX::getImageEffectHostDescription(), OFX::Clip::getPixelRod(), getProcessParams(), OFX::Clip::name(), tuttle::ofx::imageEffect::numberOfComponents(), tuttle::quotes(), OFX::RenderArguments::renderScale, OFX::RenderArguments::time, OfxPointI::x, OfxRectI::x1, OfxRectI::x2, OfxPointI::y, OfxRectI::y1, and OfxRectI::y2.
unsigned char* tuttle::plugin::inputBuffer::InputBufferPlugin::_callbackMode_imgPointer [private] |
Definition at line 86 of file InputBufferPlugin.hpp.
Referenced by callbackMode_updateImage(), InputBufferPlugin(), and render().
Definition at line 84 of file InputBufferPlugin.hpp.
Referenced by callbackMode_updateImage(), getRegionOfDefinition(), and InputBufferPlugin().
Definition at line 85 of file InputBufferPlugin.hpp.
Referenced by callbackMode_updateImage(), InputBufferPlugin(), and render().
Store temporary values (between actions). We ensure that we call the get image callback only once, but we need the values multiple times.
Definition at line 83 of file InputBufferPlugin.hpp.
Referenced by callbackMode_updateImage(), and InputBufferPlugin().
Destination image clip.
Definition at line 57 of file InputBufferPlugin.hpp.
Referenced by getClipPreferences(), InputBufferPlugin(), and render().
Definition at line 70 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 71 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 68 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 60 of file InputBufferPlugin.hpp.
Referenced by changedParam(), getProcessParams(), and InputBufferPlugin().
Definition at line 62 of file InputBufferPlugin.hpp.
Referenced by changedParam(), getProcessParams(), and InputBufferPlugin().
OFX::StringParam* tuttle::plugin::inputBuffer::InputBufferPlugin::_paramInputCallbackDestroyCustomData |
Definition at line 63 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 61 of file InputBufferPlugin.hpp.
Referenced by changedParam(), getProcessParams(), and InputBufferPlugin().
Definition at line 59 of file InputBufferPlugin.hpp.
Referenced by changedParam(), getProcessParams(), and InputBufferPlugin().
Definition at line 72 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 67 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 69 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 66 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), and InputBufferPlugin().
Definition at line 65 of file InputBufferPlugin.hpp.
Referenced by getProcessParams(), getRegionOfDefinition(), and InputBufferPlugin().
Definition at line 74 of file InputBufferPlugin.hpp.
Referenced by getClipPreferences(), getTimeDomain(), and InputBufferPlugin().
Definition at line 77 of file InputBufferPlugin.hpp.
Referenced by changedParam().