Important: The information in this document is obsolete and should not be used for new development.
A plug-in must be a bundle or shared library with a single entry point, which should be compiled as main. The main entry prototype is HYPluginMainProcPtr:
Listing 1-1 Main entry prototype
typedef HYPluginResult (*HYPluginMainProcPtr) (short which, HYPluginParams *params); |
iMovie passes the plug-in a selector in the selector field of the HYPluginParams structure. The plug-in must then perform the appropriate action for that selector. Three selectors of particular note are kPlugInitialize, kPlugDoFrame, and kPlugTerminate, which correspond respectively to the initialization, processing, and termination phases introduced above.
The which parameter identifies the item the user has chosen by name from the menu. Menu name functionality is described in detail in the section “Loading plug-ins.”
iMovie creates an opaque pointer, HYPluginInstance, that it uses to track the plug-in. If, for example, the user has created several simultaneously rendering effects based on a single plug-in, iMovie uses the HYPluginInstance to differentiate between the plug-in instances rendering those effects. The HYPluginInstance may be passed to the plug-in. The plug-in is expected to preserve it unchanged and possibly to return it in some of the API calls.
Last updated: 2007-09-04