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.
(Pierre Jasmin): Another way of saying this is generator will by default inherit some hosts defined properties. Whether that is via Project Properties or an intermediate panel that host provides to set Width, Height,... And the part that then relates to spatial format, is if this modifyable by plugin. In some apps with native plugins generator are sometimes an issue with regards to frame range (particularly when frame range does not publish explicit parameters about that). This includes when there is optional clip input in the generator. You don't necessary want to inherit temporal attributes from Clip B.
Explained like I did, right now all generators are pretty much by specs Slave.