TuttleOFX  1
tuttle::plugin::inputBuffer::InputBufferPlugin Class Reference

InputBuffer plugin. More...

#include <InputBufferPlugin.hpp>

Inheritance diagram for tuttle::plugin::inputBuffer::InputBufferPlugin:
Collaboration diagram for tuttle::plugin::inputBuffer::InputBufferPlugin:

Public Types

typedef float Scalar

Public Member Functions

 InputBufferPlugin (OfxImageEffectHandle handle)
 ~InputBufferPlugin ()
InputBufferProcessParams getProcessParams (const OfxTime time) const
void changedParam (const OFX::InstanceChangedArgs &args, const std::string &paramName)
 called when a param has just had its value changed
bool getTimeDomain (OfxRangeD &range)
 what is the time domain of this effect, valid only in the general context
void getClipPreferences (OFX::ClipPreferencesSetter &clipPreferences)
 get the clip preferences
bool getRegionOfDefinition (const OFX::RegionOfDefinitionArguments &args, OfxRectD &rod)
 The get RoD action.
void render (const OFX::RenderArguments &args)
 The overridden render function.

Data Fields

OFX::Clip_clipDst
 Destination image clip.
OFX::ChoiceParam_paramInputMode
OFX::StringParam_paramInputBufferPointer
OFX::StringParam_paramInputCallbackPointer
OFX::StringParam_paramInputCallbackCustomData
OFX::StringParam_paramInputCallbackDestroyCustomData
OFX::Int2DParam_paramSize
OFX::IntParam_paramRowByteSize
OFX::DoubleParam_paramPixelAspectRatio
OFX::DoubleParam_paramFramerate
OFX::ChoiceParam_paramPixelComponents
OFX::ChoiceParam_paramBitDepth
OFX::ChoiceParam_paramField
OFX::ChoiceParam_paramOrientation
OFX::Double2DParam_paramTimeDomain

Private Member Functions

void callbackMode_updateImage (const OfxTime time, const InputBufferProcessParams &params)
 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.

Private Attributes

CustomDataPtr _tempStoreCustomDataPtr
OfxTime _callbackMode_time
 Store temporary values (between actions). We ensure that we call the get image callback only once, but we need the values multiple times.
OfxPointI _callbackMode_imgSize
int _callbackMode_rowSizeBytes
unsigned char * _callbackMode_imgPointer

Detailed Description

InputBuffer plugin.

Definition at line 37 of file InputBufferPlugin.hpp.


Member Typedef Documentation


Constructor & Destructor Documentation

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.

Here is the call graph for this function:

tuttle::plugin::inputBuffer::InputBufferPlugin::~InputBufferPlugin ( )

Definition at line 93 of file InputBufferPlugin.cpp.


Member Function Documentation

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().

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().

Here is the call graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

void tuttle::plugin::inputBuffer::InputBufferPlugin::render ( const OFX::RenderArguments args) [virtual]

Field Documentation

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().


The documentation for this class was generated from the following files: