general_conventions - shekh/VirtualDub2 GitHub Wiki

VirtualDub Plugin SDK 1.2

Naming conventions

By convention, most symbols in VirtualDub contain the prefix VD in order to avoid conflicts with other symbols. To distinguish between VirtualDub internal symbols and symbols meant for external usage, symbols in the plugin API and in the Plugin SDK headers are prefixed with VDX instead to denote them for external usage. In some cases structures are declared identically between VirtualDub itself and the Plugin SDK headers, but the SDK versions with the VDX prefix are the ones intended for use by plugins.

Interfaces, represented in C++ by classes with only pure virtual methods, use an additional I prefix, and therefore include the tag IVDX.

Binary API conventions

VirtualDub itself is compiled with the Microsoft Visual C++ Compiler, versions 12.00 (VC6) to 14.00 (VC8). The calling convention used by the plugin API are thus based on the binary ABI used by the VC++ compiler and the Microsoft Windows platform. However, the SDK interfaces are designed to be amenable to other compilers when possible.

By default, calls in the 32-bit plugin API use the stdcall calling convention whenever possible, except for calls taking variable arguments, which use cdecl. However, the video filter interface predates this Plugin SDK and therefore uses slightly different calling conventions. In particular, most function calls use cdecl and method calls on interfaces use thiscall. The thiscall convention in particular may cause some issues if you are attempting to use a compiler other than Visual C++, because it specifies a caller-pops convention with the this pointer in ECX. If this is the case, you may have luck modifying the headers to use fastcall instead with an extra dummy first int parameter.


Copyright (C) 2007-2012 Avery Lee.

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