GDCL Home About GDCL DirectShow WinNt & WDM
GDCL Home / Technology / Video Capture

Video Capture prior to Windows 2000

Support for Video Capture on older versions of Windows is confusing. There are several APIs and several device driver models, depending on the platform. There isn't a single device driver that will do for all of Windows 95 and 98, Windows NT 4 and 2000. However the application interfaces (either VfW or DirectShow) will work on all platforms.

In Windows 2000, XP and Vista, the best solution is to use AVStream for the driver and DirectShow for the capture API. See here for a discussion of driver options.

Device Driver Models

  • Windows 95 (and Windows 3.1) have a 16-bit device driver model based on the installable driver model used throughout Video for Windows. The device driver loaded by the system must be a 16-bit DLL, and all calls will go through 16-bit code.
  • Windows NT 3.5 and 4.0 provides a 32-bit device driver model based on Video for Windows. In this case the device driver is a 32-bit User Mode DLL which must talk to the hardware via its own kernel-mode driver.
  • Windows 98, ME and Windows 2000 support a WDM-based video capture driver model using the Stream Class Driver and WDM Streaming. However Windows 98 will also support the 16-bit VfW device driver model and Windows 2000 will also support the 32-bit VfW interface.

Application Interfaces

  • All platforms support a 16-bit VfW video capture API. This supports streaming capture to a set of pre-prepared buffers, but does not allow programmatic control of formats and properties - these can only be set by dialogs.
  • Both Windows 95 and Windows NT support AVICAP: a window-based video capture api. Applications create an AVICAP window (either 16-bit or 32-bit) and send messages to the window to control its behaviour. Avicap provides complete support for capture including writing the captured data to disk and preview modes. However it is somewhat inflexible for other non-file based uses. Also, since it is based on the VfW interfaces, formats and properties cannot be set programmaticall y (and on Windows 95, you will always end up being thunked through 16-bit code).
  • There is no 32-bit VfW capture API I'm afraid (my fault that one). However, if you want to bypass AVICap on NT you can talk directly to the user-mode device driver: the device driver's interface is very similar to the VfW api. (There's no point on Windows 95 since there is no 32-bit driver model: use the 16-bit VfW api or use avicap).
  • DirectShow (from 5.1 onwards) provides filters for all these device models: there are source filters for VfW 16 and 32-bit device drivers and a proxy filter for WDM capture drivers. You could even write your own custom source filter to talk to your hardware, though this wouldn't always be a great choice.
  • WDM is not intended to be an application interface: There are proxies for both VfW and DirectShow to talk to WDM video capture drivers, so you can use either of these intefaces.

Video Capture Topics

Video Capture Overview
Video Capture on NT 4.0
DirectShow and Video Capture

Related Topics

WDM Streaming