pluginState(_:at:quality:)
Retrieves the plug-in’s parameter values, performs any calculations it needs to from those values, and packages up the result to be used later with rendering.
Declaration
func pluginState(_ pluginState: AutoreleasingUnsafeMutablePointer<NSData>?, at renderTime: CMTime, quality qualityLevel: FxQuality) throwsParameters
- pluginState:
The state of the plug-in. Your plug-in should return an autoreleased Nsdata that the host retains. Once created, your plug-in should not hold on to this pointer. The host returns this data (or a copy of it) to your plug-in during other methods, such as the Renderdestinationimage(_:sourceimages:pluginstate:at:) method and Scheduleinputs(_:withpluginstate:at:) methods.
- renderTime:
The rational time at which your plug-in is being asked to gather its rendering state.
- qualityLevel:
The requested render quality (
kFxQuality_LOW,kFxQuality_MEDIUM, orkFxQuality_HIGH).
Mentioned in
Discussion
The host application calls this method before rendering. The FxParameterRetrievalAPI* is valid during this call. Use it to get the values of your plug-in’s parameters, then put those values or the results of any calculations you need to do with those parameters to render into an NSData that you return to the host application. The host passes it back to you during subsequent calls. Do not re-use the NSData; always create a new one, as this method may be called on multiple threads at the same time.