Standard version: 1.5
(sept 23, 2016): This to be co-addressed with Spatial Formats are broken
Generators, as conceived, are not very good. They need to be broken into two types…..
Unfortunately there is probably some degree of interplay between what a plug-in might want to produce and what a host can accept. This needs to be thought about, but can almost certainly accommodated with a careful use of the get RoD/spatial format/data format calls.
This goes hand in hand with fixing the broken spatial format.
The generator context needs to advertise if it determines its own pixel and spatial format (eg: an image file reader), or should be told what pixel and spatial format it should produce. To do that it needs a new property on the effect descriptor...
A generator of type kOfxImageEffectGeneratorFormatMaster will have the kOfxImageEffectActionGetImageFormat action called to determine the format of the clip being created, while a kOfxImageEffectGeneratorFormatSlave will not. A slave will have the format determined for it by the host and the relevant properties available on the output clip.
In both cases all the other calls are standard, eg: the get region of definition call.
Note, a generator plugin may be asked to render a region that is not congruent to the output format, as with all other effect types.