The Get Frames Needed Action

	#include "ofxImageEffect.h"
	#define kOfxImageEffectActionGetFramesNeeded              "OfxImageEffectActionGetFramesNeeded"
Arguments

Description

This action lets the host ask the effect what frames are needed from each input clip to process a given frame. For example a temporal based degrainer may need several frames around the frame to render to do its work.

This action need only ever be called if the plugin has set the kOfxImageEffectPropTemporalClipAccessg property on the plugin descriptor to be true. Otherwise the host assumes that the only frame needed from the inputs is the current one and this acion is not called.

Note that each clip can have it's required frame range specified, and that you can specify discontinuous sets of ranges for each clip, for example...

	  // The effect always needs the initial frame of the source as well as the previous and current frame
	  double rangeSource[4];
	  
	  // required ranges on the source
	  rangeSource[0] = 0; // we always need frame 0 of the source
	  rangeSource[1] = 0;
	  rangeSource[2] = currentFrame - 1; // we also need the previous and current frame on the source
	  rangeSource[3] = currentFrame;
	  
	  gPropHost->propSetDoubleN(outArgs, "OfxImageClipPropFrameRange_Source", 4, rangeSource); 

Which sets two discontinuous range of frames from the 'Source' clip required as input.

Return Values

Default Action

The default frame range is simply the single frame, kOfxPropTime..kOfxPropTime, found on the inArgs property set. All the frame ranges in the outArgs property set must initialised to this value before the action is called.