Index Topic Contents | |||
Previous Topic: PID Sample (Plug-In Distributor Application) Next Topic: Multimedia Streaming |
Build Information
To use some of the filters and applications supplied as DirectShow samples, you need to build them into executable or DLL (.ax) files. To build, you need various tools. And after you build a filter, you need to register it with a unique identifier to make it appear in the Filter Graph Editor. This section contains the following topics:
Tools for Building the Samples
The tools you need to build the filters and applications supplied as DirectShow samples are included in the following list. This list contains both required and optional tools.
- Microsoft® DirectShow Software Development Kit (required).
- ANSI-compatible C/C++ compiler, such as Microsoft Visual C++® version 5.x or later (required).
- Microsoft Win32® headers and libraries (required).
- Microsoft NMAKE (supplied with Visual C++), if you want to use the supplied makefiles (optional).
- Microsoft Foundation Classes (MFC), if you want to build the two sample applications that use MFC (optional).
Building the Samples
All samples in the SDK have been provided with a makefile that is compatible with NMAKE. In some cases, a Visual C++ project makefile is also included.
To build the samples using the standard makefiles, you must first set up your build tools (for example, Microsoft Visual C++), the Win32 headers and libraries, and the DirectShow SDK. The DirectShow SDK makefiles expect to locate the standard Windows® and Win32 include files and libraries on the INCLUDE and LIB paths. The makefiles handle all DirectShow-specific files on a project-by-project basis.
The makefiles provided for each individual sample use ActiveX.mak, which is provided with the DirectShow SDK. If you are using ActiveX.mak to build for any machine, other than the default x86, you must set the CPU environment variable to indicate which kind of machine. The allowable values for the CPU are i386, ALPHA, and PPC.
Performance Note If you copy any sample makefile to create a new dynamic-link library (DLL) (including filters and PIDs) make sure that you change the base address to avoid collisions with other DLLs. A collision of DLL load address results in one of the DLLs having to be relocated during load time, thereby increasing the duration of load time. In the sample makefiles, the base address is set in DLL_BASE, which is used in ActiveX.mak. Do not let ActiveX.mak use the default value for DLL_BASE, as this will almost certainly cause collisions.
A makefile that builds all the samples is provided in the Samples directory.
Setting Up the Registry
The source directory for each sample contains a registry file (.reg). Sample filters are registered by default. You can re-register all filters in the sample by opening this file. The samples also use the preferred self-registration capabilities provided by the IAMovieSetup interface. See Register DirectShow Objects for more information.
Caution: If you modify a registry file and then use it to update your registry, you will affect the sample filter that is already installed on your system. For example, if you modify Ball.reg, you might lose access to the Ball filter (Ball.ax) in the Filter Graph Editor.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.