ref_vfmethod_runProc - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
runProc video filter method
Processes a video frame.
int runProc(const VDXFilterActivation *fa, const VDXFilterFunctions *ff);
fa | Pointer to filter activation structure. |
ff | Pointer to callback function structure. |
This method is not thread-safe.
Exceptions may be thrown from this function (see Except()).
Zero if successful, non-zero on unknown failure.
The input frame is found in fa->src
, and the output frame is
fa->dst
. Neither structure should be modified by runProc
. If your
filter is an in-place filter, the source and destination structures are
both aliased to the same buffer.
Of all the functions in a filter, this function needs to run as quickly
as possible and should be the most heavily optimized of all functions.
Frame-invariant computation, such as table generation, should be done in
startProc
or initProc
instead.
Note: Do not modify your source buffer if your filter is not in-place. In some cases, VirtualDub will need to access your source buffer after your filter has already run.
Note: Your output buffer is not persistent -- if an in-place filter follows, it will work directly in the buffer. This means, unfortunately, that recursive filters will need an additional side buffer.
Copyright (C) 2007-2012 Avery Lee.