-
Notifications
You must be signed in to change notification settings - Fork 15
videofilt_vdxframe_gettingstarted
VirtualDub Plugin SDK 1.2
Getting started with the VDXFrame video filter wrappers
The video filter API is intended to be implemented directly by filters. However, doing so can be inconvenient, because it requires writing a series of entry points in function style. The VDXFrame static library contains wrappers to simplify the writing of video filters.
Since VDXFrame is a static library, you need to link it into your DLL.
Project files are included for both Visual C++ 6.0 and Visual Studio
2005. To use VDXFrame, add the project to your workspace or solution,
and then set your DLL project to depend on the VDXFrame project. The
include path for your project must also include the include
directory
of the Plugin SDK where the vd2/VDXFrame
directory is located; you
should already have this included if you are using the main video filter
plugin headers.
Note: Because VDXFrame is a static library, its code is linked into your DLL and thus isn't part of the video filter API itself. Regardless of whether you use VDXFrame or not, your filter exports the same entry points and looks the same to the host.
The VDXFrame video filter wrappers are designed to be used as base
classes. Your filter derives from them, and the wrapper base handles the
translation between function entry points in the API and virtual methods
in the derived class. In particular, this avoids the need to manually
shuttle instance data around in (void *)
pointers and cast to and from
structure pointers.
As an example, video filters can store instance data in the
fa->filter_data
pointer. Every entry point must be written as a
straight function, which then must access and unpack the filter_data
pointer to access instance data:
int runProc(const VDXFilterActivation *fa, const VDXFilterFunctions *ff) {
MyFilterData *mfd = (MyFilterData *)fa->filter_data;
int brightness = mfd->mBrightnessSetting;
int contrast = mfd->mContrastSetting;
// ...
}
In contrast, the VideoFilter
wrapper allows data to be accessed
directly through the implicit this
pointer of a class method:
void MyFilter::Run() {
int brightness = mBrightnessSetting;
int contrast = mContrastSetting;
// ...
}
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