Copy link to clipboard
Copied
Hello
I am writing a plug-in where the rendering of a given frame depends upon several previous frames.
Thus, in order to correctly render, I need my filter to be applied to a consecutive series of frame.
If the user seeks through the clip, in order to perform a correct rendering operation, I'll need to perform a "look behind" operation.
Thus, my question is : is there an easy way to detect whether a seek operation just took place ? Do I need to perform my own caching of the time info in the PF_InData structure ?
Thanks for your help !
Copy link to clipboard
Copied
there is no automatic way of telling if the frame your effect is requested to render is sequential or not.
yes, you'll have to cache the time stamp yourself, and use it to tell the current step. (which is simple to do with sequence data)
just keep in mind that not only "seek" can give non consecutive frames for rendering.
multi processor rendering will cause each processor to be handed skipped frames,
or ram preview could skip already rendered frames and jump foreward.
so in any case, i see no choice but to cache the time stamp.
Copy link to clipboard
Copied
Thanks a lot for your reply.
I guess I'll have to make use of the flag described in this post :
http://forums.adobe.com/thread/741634?tstart=0
in order to prevent (as much as possible) my plugin to be fed out-of-order frames.
Best,
Benjamin-
Copy link to clipboard
Copied
Hi Benjamin,
The flag described at that post is for a different problem. If you need to make a calculation that starts from the first frame and accumulates over the duration of the frames, you should be prepared to handle a request for anytime, and not necessarily the next frame in sequence from the beginning. What happens when the user moves the time needle to the middle of the footage? An effect should be prepared to handle normal use cases like that.
One approach is to go back and calculate all the necessary frames between the current frame and the last frame that has been calculated. You can use PF_CHECKOUT_PARAM() to get input frames for any previous frame that you need to make the calculation. And then cache the results of your calculations in sequence data.
Regards,
Zac
Copy link to clipboard
Copied
Thanks for your reply, Zac.
On the other hand, I think PF_HaveInputsChangedOverTimeSpan will be VERY useful for me !