September 28, 2008

How to mute an Audio Capture Filter of webcam in DirectShow?

If you want to mute an audio capture of webcam, you have to query IAMAudioInputMixer interface on its INPUT PIN, and then use put_Enable method to disable it.

Both the audio capture filter itself and its input pin have IAMAudioInputMixer interface, but the put_Enable / get_Enable methods are implemented on input pin only.

Reference in MSDN:

September 07, 2008

How to get the string from GUID in DirectShow?

There is a very useful global array that contains strings representing the GUIDs defined in Uuids.h

char* GuidNames[guid]

const char* GetMajorTypeString(CMediaType* pMediaType)
  return GuidNames[*(pMediaType->Type())];


September 06, 2008

Small, simple, cross-platform, free and fast C++ XML Parser

I prefer using this one of XML Parser. It is really simple and convenience. And it contains ONLY TWO files, including "xmlparser.cpp" and "xmlparser.h"

I can compile it without error on VC++ (Visual C++) 2003 and 2005, and it works very well.

You can get more detail information on author's web site.

Small, simple, cross-platform, free and fast C++ XML Parser

September 05, 2008

The easiest way to toggle / next bookmark in Visual Studio

Toggle Bookmark: Ctrl + K Ctrl +K
Next Bookmark: Ctrl + K Ctrl + N

You can find the above shortcuts on the bookmark menu, but it is NOT the easiest way to do that.

The other Shortcuts:
Toggle Bookmark: Ctrl + F2
Next Bookmark: F2
(The key mapping is "Visual C++")