i see. indeed a complicated situation.
i'm not familiar with the OFX API, so some of what i would tell might not be applicable to your case.
1. sequence data.
in AE, sequence data for the render threads is always separate from the one in the UI thread.
you can have all render threads share one seq data handle or have each one have it's own, by using PF_OutFlag2_MUTABLE_RENDER_SEQUENCE_DATA_SLOWER.
in the case of multiple render threads, a single OFX plugin shared between them may have asynchronous param values being updated (because of keyframed params, or expressions), and thefore produce wrong render results for a given frame. i don't know if that's a valid concern in the way your system is set up...
perhpas you should consider the render threads copy of the OFX effect as a separate entity. it seems wasteful, but all it would mean that for every change on the UI instance, the render instances of the OFX are destroyed (on sequence_setdown) and rebuilt (on sequence_resetup) when syncing the ui and render thread seq data. if you're comfortable with that idea, then the nighmare trying to merge the render and ui seq datas into one persisant piece of memory is over. (and it is a nightmare, let me assure you)
2. initaiting a new instance.
since in AE during a sequence_setup call the effect instance does not yet exist and is therefore inaccessible, i would suggest you mark the new OFX effect int he sequence data as "uninitiated", and then: - on the ui thread, use the first UPDATE_PARAMS_UI call and set the default params data then. - on the render thread, if a render call is triggered on an "uninitialized" OFX, just ignore the param values AE has, and use the deault ones in the OFX. that way, you'll get a correct render even before the UI thread has a chance to update the params.
3. sequence data is always available. is it not during xGPUFilterEntry? isn't PF_EffectSequenceDataSuite1 available there?
... View more