Sunday, February 01, 2009

Setting up Environment for Directshow Development

We were upgrading our Directshow SDK since it is felt a little outdated now. We were still using the one from the age where it is still under DirectX SDK. There's currenlty nothing felt wrong or there were errors, we just would like to have it not too far from the latest release available to avoid the code stuck too long in the past.

The needs :

  • Multimedia Application Development : need standard Directshow library
  • Filter Development : Directshow Baseclasses would need to compile

To fulfill those, The current state of available SDKs from Microsoft require me to install two separate (and large) package, that is :
  • Microsoft Windows SDK : to access what is considered to be standard feature available in Windows. Apparently, now Directshow is considered standard so it is included in this base SDK while it used to be under Directx SDK.
  • DirectX SDK : you could only do straightforward Directshow development like file playing using Windows SDK, you need another package (below) if you want to access the complete API in Directshow since some headers from DirectX is still needed when accessing more complex part of the Directshow API. You'll see why it is needed below.
My existing setup is Visual Studio (VS) 2005 Professional SP1 on Vista. I have also Visual C++ 2008 Express installed.

A good page for all things Windows SDK can be seen here. It contains a list of existing downloads, the latest available together with the previous ones, and there's also links to supportive materials i.e: forums, related SDKs and downloads.

I started with installing Windows SDK 7 since it's on the top of the download list (It is cutely-named "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1: BETA"). The download took a while, and you better have something else to do rather than waiting for it. The installation went long also but finish well. I checked the VS and it seems it's not registered yet despite the release notes say that if you install the SDK after you have the VS installed it should register itself. Simple enough, there's Visual Studio registration tool on the Program Menu to do it semi-manually.

It does not work, however, at least not with VS 2005. When I try to build a simple player, it complained about Strmiids.lib debugging information corrupt. Testing with Visual C++ 2008 Express prooved succesful. After googling around, it seems the error usually come when the SDK no longer support certain compiler. So, I get the next SDK on the list (6.1, a.k.a "Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5") and do some more waiting...

Long story short, it fixed the problem, I could build the simple Directshow application with it. But to make something more complex you'll get into trouble with dxtrans.h not found. So, according to this, I need to download and install DirectX-SDK-August-2007. So, time to download and wait some more...

After the install (it automatically register itself to VS), It directly fixes the problem and unlike being said on the webpage linked above, no manual copying of files needed.

Now the development environment ready for some "fun" time with Directshow. Hopefully, no more waiting for SDK downloads needed.

1 comment:

Anonymous said...

Thank you! I've been tearing my hair out tonight trying to get this to build in VS2005. Guess I need to download the older SDK.