Tutorial step 2: creating the FilterDefinition record |
|
Every VirtualDub filter holds the information about its definition in a record of type TFilterDefinition:
TFilterDefinition = packed record
next: PFilterDefinition;
prev: PFilterDefinition;
module: PFilterModule;
name: PChar;
desc: PChar;
maker: PChar;
private_data: Pointer;
inst_data_size: Integer;
initProc: FilterInitProc;
deinitProc: FilterDeinitProc;
runProc: FilterRunProc;
paramProc: FilterParamProc;
configProc: FilterConfigProc;
stringProc: FilterStringProc;
startProc: FilterStartProc;
endProc: FilterEndProc;
script_obj: PCScriptObject;
fssProc: FilterScriptStrProc;
end;
This record tells VirtualDub how to present the filter to the user and how to invoke it. These are the necessary fields:
The next, prev, module, and private_data fields are for VirtualDub's internal use, and should be initialized to NIL. Creating the FilterDefinition for our filterWe only support one function, and need no instance data, so our record is fairly simple:
Const We're done. Later on, we'll fill in other fields as we need them, but for a simple pixel-level filter, this is all we need. |
© 2005 Fernando Reis < >Adapted from VirtualDub external filter SDK 1.05 documentation © 1999-2001 Avery Lee |