#30 directshow implementation

klaus triendl

This patch addresses feature request: "Support for DirectShow in Windows - ID: 3128414" (https://sourceforge.net/tracker/?func=detail&aid=3128414&group_id=189236&atid=928518).

1) You need to configure --with-directshow to compile with directshow instead of VfW.

2) In order to select a camera one can use the known options to specify the camera index <n> or the linux device name /dev/video<n> where <n> ranges from 0-9.
The third possibility is to specify the device path. Unfortunately the full device path needed can't be found in the windows hardware manager, but has to be rather queried programmatically from the camera's "DevicePath" property. Don't hesitate to ask me how to do this in C++. For C, you can take a look at the directshow implementation.

3) Unfortunately, because directshow is a COM-based and a
capacious technology, things aren't as simple as with VfW.
COM-programming in C is a bit quirky :) but especially many symbols and
dependent header files from the directshow and windows sdk are needed.
Because they're not provided by mingw, I ended up using wine. So, the
deal is that zbar needs and expects a patched (!) version of wine 1.4,
currently as header-only subfolders of the zbar/video folder. However,
I didn't place wine into the repository.

When you want to try out directshow with zbar, you find attached my
patched wine version wine-1.4-zbar.7z, which you unpack into the
zbar/video folder. plus a document describing
details of why I have chosen wine and how I came up with wine-1.4-zbar.


  • klaus triendl
    klaus triendl

    Because sourceforge imposes a limit of 256k for attached files, you have to download the wine package for zbar from my website: triendl[dot]eu[slash]zbar[slash]wine-1.4-zbar.7z

  • klaus triendl
    klaus triendl

    directshow implementation