-
Notifications
You must be signed in to change notification settings - Fork 18
general_devenv
VirtualDub Plugin SDK 1.2
Setting up your development environment
The VirtualDub Plugin SDK primarily supports the following compilers:
- Microsoft Visual C++ 6.0 SP5 + Processor Pack
- Microsoft Visual Studio 2005 SP1
Project files are not provided for Visual C++ .NET (2002), Visual C++ .NET (2003), or Visual Studio 2008, but the source code and include files should be compatible.
It is possible to create a plugin with other compilers, such as GCC, but
doing so requires some modifications to the header files and isn't
supported. In particular, the IVDXFilterPreview interfaces uses the
Visual C++ __thiscall calling convention, which may require
workarounds. Video filters have also been written in the past in other
languages, such as Borland's Delphi, but doing so is definitely out of
scope for this SDK.
Create a standard Win32 dynamically linked library (DLL) project. In Visual Studio 2005, this is a suboption inside the Win32 Project template. Do not create a .NET (CLR) based project.
Add the include folder from this SDK to your project's preprocessor
include paths. This configuration option exists under C/C++, General
in Visual Studio 2005 and C/C++, Preprocess in Visual C++ 6.0.
If you are using Visual Studio .NET (2002) or later, under Code Generation, change the C Runtime Library (CRT) used by your DLL to Debug Multithreaded for a Debug build and Multithreaded for a Release build. This avoids a dependency on the CRT DLLs, which you would otherwise have to redistribute with your application. The CRT DLLs are especially annoying to redistribute in Visual Studio 2005.
If you are using the VDXFrame helper library, you should insert it
into your workspace/solution and add it as a dependency to your project.
The Plugin SDK does not come with .libs, so you will need to compile the
library.
For input driver plugin DLLs, you will probably need to add a module
definition (.def) file to your project to get the DLL entry point
exported properly. See SampleInputDriver.def from the sample input
driver; you can probably copy that file verbatim, and then select it
under Linker, Input, Module Definition File in project settings. In
Visual C++ 6.0, you will need to add the /def: flag manually to the
linker command line.
Under link options, you should change the extension of the output DLL
from .dll to .vdf for a video filter DLL or .vdplugin for an input
driver DLL. You can also use .vdplugin for video filters if you are
targeting recent versions of VirtualDub only.
You can test and debug your plugin easily by having your debugger launch VirtualDub with the plugin automatically loaded. To do so, configure your debugger to use the following command:
VirtualDub /F path-to-filter
In Microsoft Visual Studio 2005, you can do this under project settings,
Configuration Properties, Debugging. Set Command to point to
VirtualDub.exe, and Command Arguments to /F "$(TargetPath)".
Once this has been set up, you should be able to set breakpoints and
trace execution within your video filter under the debugger. You may
also want to save a configuration file with your filter already inserted
into the video filter chain so that you don't have to do so every time;
you can do so by saving a configuration file in VirtualDub and executing
it via the /s command line switch.
Note: Recent versions of VirtualDub automatically unload plugin DLLs when they are not in use, so you may have trouble with breakpoints initially not working in your debugger. You can lock your DLL in memory by adding filters to the filter chain or opening files with the input driver, both of which will keep the necessary plugin DLL loaded.
Copyright (C) 2007-2012 Avery Lee.
Setting up your development environment
Conventions
Plugin initialization
Dynamic loading
Reference counting
Using CPU extensions
Introduction
What's new
Breaking changes
Gotchas
Deprecated features
Migrating from the old Filter SDK
Programming model
Handling bitmaps
Creating a video filter
Setting filter parameters
Processing video frames
Managing filter data
Creating time-varying filters
Handling aspect ratio
Prefetching multiple source frames
Handling multiple sources
Making a filter configurable
Scripting support
CPU dependent optimization
VDXA index omitted
Getting started
Writing the module entry point
Creating a video filter
Adding configurability
Adding script support
Introduction
What's new
Autodetect
Direct mode
Video frames vs. samples
Video decodint model
Video decoder