ref_vfmethod_startProc - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
startProc video filter method
Prepares a filter instance for processing video frames.
int startProc(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.
If omitted, no default action is taken.
This function is the ideal place for memory allocation and table initialization to take place. Filter chain startup is comparatively rare, so this is the ideal place to put lengthy precomputation.
If you allocate a number of resources in this function, and one of the
allocations fails, you do not have to release the resources that were
allocated successfully. VirtualDub always calls endProc
for all
filters on failure, so you can free the resources there.
Copyright (C) 2007-2012 Avery Lee.