ref_vfmethod_copyProc - shekh/VirtualDub2 GitHub Wiki

VirtualDub Plugin SDK 1.2

copyProc video filter method

copyProc

Creates a clone of the filter instance.

int copyProc(VDXFilterActivation *fa, const VDXFilterFunctions *ff, void *dst);

Parameters

fa Pointer to filter activation structure.
ff Pointer to callback function structure.
dst Memory location for new instance data.

Thread safety

This method is not thread-safe.

Exceptions

Exceptions may be thrown from this function (see Except()).

Return value

This function should return zero; the return value is ignored.

API version requirement

Requires V9 or later. Ignored starting with V16.

Default behavior

If omitted, the instance data is copied verbatim.

Remarks

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.

⚠️ **GitHub.com Fallback** ⚠️