TuttleOFX  1
ofxCorePlugin.h File Reference
#include <stddef.h>
#include <limits.h>
Include dependency graph for ofxCorePlugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  OfxHost
 Generic host structure passed to OfxPlugin::setHost function. More...
struct  OfxPlugin
 The structure that defines a plug-in to a host. More...

Defines

#define kOfxActionLoad   "OfxActionLoad"
 Action called just after a plug-in has been loaded, for more details see ArchitectureMainFunction and ActionsGeneralLoad.
#define kOfxActionDescribe   "OfxActionDescribe"
 Action called to have a plug-in describe itself to the host, for more details see ArchitectureMainFunction and ActionsGeneralDescribe.
#define kOfxActionUnload   "OfxActionUnload"
 Action called just before a plug-in is unloaded, for more details see ArchitectureMainFunction and ActionsGeneralUnload.
#define kOfxActionCreateInstance   "OfxActionCreateInstance"
 Action called just after an instance has been created ArchitectureMainFunction and ActionsGeneralCreateInstance.
#define kOfxActionDestroyInstance   "OfxActionDestroyInstance"
 Action called just before an instance is destroyed and ActionsGeneralDestroyInstance.
#define kOfxStatOK   0
 Status code indicating all was fine.
#define kOfxStatFailed   ( (int)1 )
 Status error code for a failed operation.
#define kOfxStatErrFatal   ( (int)2 )
 Status error code for a fatal error.
#define kOfxStatErrUnknown   ( (int)3 )
 Status error code for an operation on or request for an unknown object.
#define kOfxStatErrMissingHostFeature   ( (int) 4 )
 Status error code returned by plug-ins when they are missing host functionality, either an API or some optional functionality (eg: custom params).
#define kOfxStatErrUnsupported   ( (int) 5 )
 Status error code for an unsupported feature/operation.
#define kOfxStatErrExists   ( (int) 6 )
 Status error code for an operation attempting to create something that exists.
#define kOfxStatErrFormat   ( (int) 7 )
 Status error code for an incorrect format.
#define kOfxStatErrMemory   ( (int) 8 )
 Status error code indicating that something failed due to memory shortage.
#define kOfxStatErrBadHandle   ( (int) 9 )
 Status error code for an operation on a bad handle.
#define kOfxStatErrBadIndex   ( (int)10 )
 Status error code indicating that a given index was invalid or unavailable.
#define kOfxStatErrValue   ( (int) 11 )
 Status error code indicating that something failed due an illegal value.
#define kOfxStatReplyYes   ( (int) 12 )
 OfxStatus returned indicating a 'yes'.
#define kOfxStatReplyNo   ( (int) 13 )
 OfxStatus returned indicating a 'no'.
#define kOfxStatReplyDefault   ( (int) 14 )
 OfxStatus returned indicating that a default action should be performed.

Typedefs

typedef struct
OfxPropertySetStruct * 
OfxPropertySetHandle
 Platform independent export macro.
typedef int OfxStatus
 OFX status return type.
typedef struct OfxHost OfxHost
 Generic host structure passed to OfxPlugin::setHost function.
typedef OfxStatusOfxPluginEntryPoint )(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs)
 Entry point for plug-ins.
typedef struct OfxPlugin OfxPlugin
 The structure that defines a plug-in to a host.

Functions

OfxExport OfxPluginOfxGetPlugin (int nth)
 Returns the 'nth' plug-in implemented inside a binary.
OfxExport int OfxGetNumberOfPlugins (void)
 Defines the number of plug-ins implemented inside a binary.

Define Documentation

#define kOfxStatErrFatal   ( (int)2 )

Status error code for a fatal error.

Only returned in the case where the plug-in or host cannot continue to function and needs to be restarted.

Definition at line 200 of file ofxCorePlugin.h.

Referenced by tuttle::exception::Fatal::Fatal(), OFX::ParamSet::getParam(), tuttle::ofx::mapStatusToString(), and OFX::mapStatusToString().

#define kOfxStatErrFormat   ( (int) 7 )

Status error code for an incorrect format.

Definition at line 218 of file ofxCorePlugin.h.

Referenced by tuttle::exception::Format::Format(), tuttle::ofx::mapStatusToString(), and OFX::mapStatusToString().

#define kOfxStatErrMemory   ( (int) 8 )
#define kOfxStatOK   0

Status code indicating all was fine.

Definition at line 191 of file ofxCorePlugin.h.

Referenced by OFX::memory::allocate(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::beginInstanceChangedAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::beginInstanceEditAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::beginSequenceRenderAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::clipInstanceChangedAction(), tuttle::host::ofx::interact::OfxhInteract::createInstanceAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::createInstanceAction(), OFX::ImageEffectDescriptor::defineClip(), tuttle::host::ofx::interact::OfxhInteractDescriptor::describe(), tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin::describeInContextAction(), tuttle::host::ofx::interact::OfxhInteract::drawAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::endInstanceChangedAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::endInstanceEditAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::endSequenceRenderAction(), tuttle::host::ofx::interact::OfxhInteract::gainFocusAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getClipPreferencesAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getFramesNeededAction(), OFX::MultiThread::getNumCPUs(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getRegionOfDefinitionAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getRegionOfInterestAction(), OFX::MultiThread::getThreadIndex(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getTimeDomainAction(), tuttle::host::attribute::GenericInterpolator< T >::getValue(), OFX::Private::interactMainEntry(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::isIdentityAction(), tuttle::host::ofx::interact::OfxhInteract::keyDownAction(), tuttle::host::ofx::interact::OfxhInteract::keyRepeatAction(), tuttle::host::ofx::interact::OfxhInteract::keyUpAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin::loadAndDescribeActions(), tuttle::host::ofx::imageEffect::OfxhImageEffectPluginCache::loadFromPlugin(), tuttle::host::ofx::interact::OfxhInteract::loseFocusAction(), OFX::Private::mainEntryStr(), OFX::mapMessageReplyEnumToStatus(), OFX::mapMessageReplyStatusToEnum(), tuttle::ofx::mapStatusToString(), OFX::mapStatusToString(), OFX::ParamSet::paramExists(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::paramInstanceChangedAction(), tuttle::host::ofx::interact::OfxhInteract::penDownAction(), tuttle::host::ofx::interact::OfxhInteract::penMotionAction(), tuttle::host::ofx::interact::OfxhInteract::penUpAction(), OFX::ImageEffect::progressStart(), OFX::PropertySet::propGetDimension(), OFX::PropertySet::propGetDouble(), OFX::PropertySet::propGetInt(), OFX::PropertySet::propGetPointer(), OFX::PropertySet::propGetString(), OFX::PropertySet::propReset(), OFX::PropertySet::propSetDouble(), OFX::PropertySet::propSetInt(), OFX::PropertySet::propSetPointer(), OFX::PropertySet::propSetString(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::purgeCachesAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::renderAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::syncPrivateDataAction(), OFX::throwPropertyException(), OFX::throwSuiteStatusException(), OFX::ImageEffect::timeLineGetTime(), OFX::MultiThread::Mutex::tryLock(), and tuttle::host::Host::vmessage().

#define kOfxStatReplyDefault   ( (int) 14 )

OfxStatus returned indicating that a default action should be performed.

Definition at line 239 of file ofxCorePlugin.h.

Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::beginInstanceChangedAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::beginInstanceEditAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::beginSequenceRenderAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::clipInstanceChangedAction(), tuttle::host::ofx::interact::OfxhInteract::createInstanceAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::createInstanceAction(), tuttle::host::ofx::interact::OfxhInteractDescriptor::describe(), tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin::describeInContextAction(), tuttle::host::ofx::interact::OfxhInteract::drawAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::endInstanceChangedAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::endInstanceEditAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::endSequenceRenderAction(), tuttle::host::ofx::interact::OfxhInteract::gainFocusAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getClipPreferencesAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getFramesNeededAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getRegionOfDefinitionAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getRegionOfInterestAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::getTimeDomainAction(), OFX::Private::interactMainEntry(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::isIdentityAction(), tuttle::host::ofx::interact::OfxhInteract::keyDownAction(), tuttle::host::ofx::interact::OfxhInteract::keyRepeatAction(), tuttle::host::ofx::interact::OfxhInteract::keyUpAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin::loadAndDescribeActions(), tuttle::host::ofx::imageEffect::OfxhImageEffectPluginCache::loadFromPlugin(), tuttle::host::ofx::interact::OfxhInteract::loseFocusAction(), OFX::Private::mainEntryStr(), tuttle::ofx::mapStatusToString(), OFX::mapStatusToString(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::paramInstanceChangedAction(), tuttle::host::ofx::interact::OfxhInteract::penDownAction(), tuttle::host::ofx::interact::OfxhInteract::penMotionAction(), tuttle::host::ofx::interact::OfxhInteract::penUpAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::purgeCachesAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::renderAction(), tuttle::host::ofx::imageEffect::OfxhImageEffectNode::syncPrivateDataAction(), OFX::throwPropertyException(), and OFX::throwSuiteStatusException().


Typedef Documentation

typedef struct OfxHost OfxHost

Generic host structure passed to OfxPlugin::setHost function.

This structure contains what is needed by a plug-in to bootstrap it's connection to the host.

typedef struct OfxPlugin OfxPlugin

The structure that defines a plug-in to a host.

This structure is the first element in any plug-in structure using the OFX plug-in architecture. By examining it's members a host can determine the API that the plug-in implements, the version of that API, it's name and version.

For details see Architecture.

typedef OfxStatus( OfxPluginEntryPoint)(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs)

Entry point for plug-ins.

  • action - ASCII c string indicating which action to take
  • instance - object to which action should be applied, this will need to be cast to the appropriate blind data type depending on the action
  • inData - handle that contains action specific properties
  • outData - handle where the plug-in should set various action specific properties

This is how the host generally communicates with a plug-in. Entry points are used to pass messages to various objects used within OFX. The main use is within the OfxPlugin struct.

The exact set of actions is determined by the plug-in API that is being implemented, however all plug-ins can perform several actions. For the list of actions consult OFX Actions.

Definition at line 82 of file ofxCorePlugin.h.

typedef struct OfxPropertySetStruct* OfxPropertySetHandle

Platform independent export macro.

This macro is to be used before any symbol that is to be exported from a plug-in. This is OS/compiler dependent.Blind data structure to manipulate sets of properties through

Definition at line 35 of file ofxCorePlugin.h.

typedef int OfxStatus

OFX status return type.

Definition at line 38 of file ofxCorePlugin.h.


Function Documentation

OfxExport int OfxGetNumberOfPlugins ( void  )

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

A host calls this to determine how many plug-ins there are inside a binary it has loaded. A function of this type must be implemented in and exported from each plug-in 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)

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

Returns a pointer to the 'nth' plug-in implemented in the binary. A function of this type must be implemented in and exported from each plug-in binary.

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: