Building DirectShow Filters (Windows Embedded CE 6.0)
1/6/2010
To build a DirectShow filter, you must set up the proper environment and then follow the steps in this topic.
If you build a DirectShow filter, you must first set up your environment as described in Building DirectShow Applications in addition to performing the following steps:
Use the __stdcall calling convention.
Set the entry-point symbol to DllMainCRTStartup@12.
If you implement the filter as a DLL, include a definition (.def) file that exports the DLL functions. The following is an example of a definition file. The filter's output file is assumed to be Filter.dll.
LIBRARY FILTER.DLL DESCRIPTION 'Description of my filter' EXPORTS DllGetClassObject DllCanUnloadNow DllRegisterServer DllUnregisterServer
In addition, if you are using the DirectShow base classes, do the following:
Build the base class library.
Include the header file Streams.h.
For release builds, add the preprocessor flag RELEASE. For debug builds, add the preprocessor flag DEBUG.
Link to the following library files.
Library File Description Strmiids.lib
Exports class identifiers (CLSIDs) and interface identifiers (IIDs). All DirectShow applications require this library.
Ole32.lib Ole32auth.lib Uuid.lib
These are COM libraries that are typically required when building filters. Depending on the needs of you project, you may not need all these libraries.
Library File | Description |
---|---|
Strmbase.lib |
If you do not use the DirectShow base classes, this library is not required. |
When you build your run-time image, Strmbase.lib is generated from the publicly available source code located at %_WINCEROOT%\Public\DirectX\Sdk\Samples\Dshow\Baseclasses. This library file will contain any changes or extensions that you make to the standard DirectShow base classes. Qtzbase.lib contains the library of standard DirectShow bases classes. It cannot be modified during the build process. You can use Qtzbase.lib in cases where you want to be certain that your application receives the default behavior from the DirectShow base classes. If you have not made any custom modifications to the DirectShow bases classes, then Strmbase.lib and Qtzbase.lib will both provide exactly the same results. **
See Also
Concepts
Setting Up the Build Environment
Building DirectShow Applications