ref_vfmethod_copyProc - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
copyProc video filter method
Creates a clone of the filter instance.
int copyProc(VDXFilterActivation *fa, const VDXFilterFunctions *ff, void *dst);
fa | Pointer to filter activation structure. |
ff | Pointer to callback function structure. |
dst | Memory location for new instance data. |
This method is not thread-safe.
Exceptions may be thrown from this function (see Except()).
This function should return zero; the return value is ignored.
Requires V9 or later. Ignored starting with V16.
If omitted, the instance data is copied verbatim.
This function allows you to implement a copy constructor for your
filter, which then allows you to store pointers to allocated and
destructable objects in your filter structure. To do this, you must tie
copyProc
to your class's copy constructor, initProc
to your regular
constructor, and deinitProc
to your destructor. See Managing filter
data for more details.
There is an annoying issue with copyProc
: it does not receive the
activation or function table pointers for the new instance, only the
filter data memory. This means that all functions have to update any
cached fa
and ff
pointers on entry to catch the new context. The
copyProc2 function was added to fix this
problem.
Copyright (C) 2007-2012 Avery Lee.