TuttleOFX  1
ofxsImageEffect.cpp File Reference
#include "ofxsSupportPrivate.h"
#include "ofxsUtilities.h"
#include <tuttle/common/utils/backtrace.hpp>
#include <tuttle/common/exceptions.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/foreach.hpp>
#include <boost/exception/diagnostic_information.hpp>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
Include dependency graph for ofxsImageEffect.cpp:

Go to the source code of this file.

Data Structures

struct  OFX::OfxPlugInfo

Namespaces

namespace  OFX
 

The core 'OFX Support' namespace, used by plugin implementations. All code for these are defined in the common support libraries.


namespace  OFX::Private
 

OFX::Private namespace, for things private to the support library code here generally calls image effect class members.


namespace  OFX::Plugin
 

The OFX::Plugin namespace. All the functions in here needs to be defined by each plugin that uses the support libs.


Typedefs

typedef std::map< std::string,
OfxPlugInfo
OFX::OfxPlugInfoMap
typedef std::vector< OfxPlugin * > OFX::OfxPluginArray

Functions

ImageEffectHostDescriptionOFX::getImageEffectHostDescription ()
 retrieve the host description
EContext OFX::mapContextStringToEnum (const std::string &s)
 map a std::string to a context
const std::string OFX::mapContextEnumToString (const EContext s)
 map a std::string to a context
const std::string OFX::mapMessageTypeEnumToString (const OFX::Message::EMessageType type)
OFX::Message::EMessageReply OFX::mapMessageReplyStatusToEnum (const OfxStatus stat)
OfxStatus OFX::mapMessageReplyEnumToStatus (const OFX::Message::EMessageReply stat)
InstanceChangeReason OFX::mapInstanceChangedReasonStringToEnum (const std::string &s)
 map a std::string to a context
EBitDepth OFX::mapBitDepthStringToEnum (const std::string &str)
 turns a bit depth string into and enum
const std::string OFX::mapBitDepthEnumToString (const EBitDepth e)
EPixelComponent OFX::mapPixelComponentStringToEnum (const std::string &str)
 turns a pixel component string into and enum
std::string OFX::mapPixelComponentEnumToString (const EPixelComponent e)
EPreMultiplication OFX::mapPreMultiplicationStringToEnum (const std::string &str)
 turns a premultiplication string into and enum
std::string OFX::mapPreMultiplicationEnumToString (const EPreMultiplication e)
EField OFX::mapFieldStringToEnum (const std::string &str)
 turns a field string into and enum
std::string OFX::mapFieldEnumToString (const EField e)
void OFX::Private::fetchHostDescription (OfxHost *host)
 Creates the global host description and sets its properties.
OFX::PropertySet OFX::Private::fetchEffectProps (OfxImageEffectHandle handle)
 fetch the effect property set from the ImageEffectHandle
void OFX::Private::loadAction (void)
 Library side load action, this fetches all the suite pointers.
void OFX::Private::unloadAction (const char *id)
 Library side unload action, this fetches all the suite pointers.
ImageEffectOFX::Private::retrieveImageEffectPointer (OfxImageEffectHandle handle)
 fetches our pointer out of the props on the handle
void OFX::Private::checkMainHandles (const std::string &action, const void *handle, OfxPropertySetHandle inArgsHandle, OfxPropertySetHandle outArgsHandle, bool handleCanBeNull, bool inArgsCanBeNull, bool outArgsCanBeNull)
 Checks the handles passed into the plugin's main entry point.
void OFX::Private::getRenderActionArguments (RenderArguments &args, OFX::PropertySet inArgs)
 Fetches the arguments used in a render action 'inargs' property set into a POD struct.
void OFX::Private::renderAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs)
 Library side render action, fetches relevant properties and calls the client code.
void OFX::Private::beginSequenceRenderAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs)
 Library side render begin sequence render action, fetches relevant properties and calls the client code.
void OFX::Private::endSequenceRenderAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs)
 Library side render begin sequence render action, fetches relevant properties and calls the client code.
bool OFX::Private::isIdentityAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs, OFX::PropertySet &outArgs)
 Library side render begin sequence render action, fetches relevant properties and calls the client code.
bool OFX::Private::regionOfDefinitionAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs, OFX::PropertySet &outArgs)
 Library side get region of definition function.
bool OFX::Private::regionsOfInterestAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs, OFX::PropertySet &outArgs, const char *plugname)
 Library side get regions of interest function.
bool OFX::Private::framesNeededAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs, OFX::PropertySet &outArgs, const char *plugname)
 Library side frames needed action.
bool OFX::Private::getTimeDomainAction (OfxImageEffectHandle handle, OFX::PropertySet &outArgs)
 Library side get regions of interest function.
bool OFX::Private::clipPreferencesAction (OfxImageEffectHandle handle, OFX::PropertySet &outArgs, const char *plugname)
 Library side get regions of interest function.
void OFX::Private::beginInstanceChangedAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs)
 Library side begin instance changed action.
void OFX::Private::instanceChangedAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs)
 Library side instance changed action.
void OFX::Private::endInstanceChangedAction (OfxImageEffectHandle handle, OFX::PropertySet inArgs)
 Library side end instance changed action.
OfxStatus OFX::Private::mainEntryStr (const char *actionRaw, const void *handleRaw, OfxPropertySetHandle inArgsRaw, OfxPropertySetHandle outArgsRaw, const char *plugname)
 The main entry point for the plugin.
void OFX::Private::setHost (OfxHost *host)
 The plugin function that gets passed the host structure.
OfxPlugInfo OFX::Private::generatePlugInfo (PluginFactory *factory)
void * OFX::fetchSuite (const char *suiteName, int suiteVersion, bool optional=false)
 Fetch's a suite from the host and logs errors.
void OFX::Plugin::getPluginIDs (OFX::PluginFactoryArray &ids)
void init ()
OfxExport int OfxGetNumberOfPlugins (void)
 , mandated function returning the number of plugins, which is always 1
OfxExport OfxPluginOfxGetPlugin (int nth)
 , mandated function returning the nth plugin

Variables

OFX::PluginFactoryArray OFX::plugIDs
OfxPlugInfoMap OFX::Private::plugInfoMap
OfxPluginArray OFX::Private::ofxPlugs
ImageEffectHostDescription OFX::Private::gHostDescription
 the global host description
bool OFX::Private::gHostDescriptionHasInit = false
int OFX::Private::gLoadCount = 0
 Keeps count of how many times load/unload have been called.
bool OFX::Private::gHasInit = false
OfxHostOFX::Private::gHost = NULL
 Pointer to the host.
OfxImageEffectSuiteV1OFX::Private::gEffectSuite = NULL
 Pointer to the effect suite.
OfxPropertySuiteV1OFX::Private::gPropSuite = NULL
 Pointer to the property suite.
OfxInteractSuiteV1OFX::Private::gInteractSuite = NULL
 Pointer to the interact suite.
OfxParameterSuiteV1OFX::Private::gParamSuite = NULL
 Pointer to the parameter suite.
OfxMemorySuiteV1OFX::Private::gMemorySuite = NULL
 Pointer to the general memory suite.
OfxMultiThreadSuiteV1OFX::Private::gThreadSuite = NULL
 Pointer to the threading suite.
OfxMessageSuiteV1OFX::Private::gMessageSuite = NULL
 Pointer to the message suite.
OfxProgressSuiteV1OFX::Private::gProgressSuite = NULL
 Pointer to the optional progress suite.
OfxTimeLineSuiteV1OFX::Private::gTimeLineSuite = NULL
 Pointer to the optional progress suite.
OfxParametricParameterSuiteV1OFX::Private::gParametricParameterSuite = NULL
 Pointer to the parametric parameter suite.
NukeOfxCameraSuiteV1OFX::Private::gCameraParameterSuite = NULL
 Pointer to the camera parameter suite (nuke ofx extension)
EffectDescriptorMap OFX::Private::gEffectDescriptors

Function Documentation

OfxExport int OfxGetNumberOfPlugins ( void  )

, mandated function returning the number of plugins, which is always 1

Defines the number of plug-ins implemented inside a binary.

Definition at line 2819 of file ofxsImageEffect.cpp.

References init(), and OFX::plugIDs.

Here is the call graph for this function:

OfxExport OfxPlugin* OfxGetPlugin ( int  nth)

, mandated function returning the nth plugin

Returns the 'nth' plug-in implemented inside a binary.

We call the plugin side defined OFX::Plugin::getPluginID function to find out what to set.

Definition at line 2829 of file ofxsImageEffect.cpp.

References OFX::Log::error(), init(), OFX::Private::ofxPlugs, and OFX::Private::plugInfoMap.

Here is the call graph for this function: