DirectShow Spy: Filter Mapper Spy

DirectShow Filter Graph Spy was updated to add new functionality: spying over another DirectShow object – Filter Mapper. Filter Mapper object is used for filter registration purposes and also internally by DirectShow’s Intelligent Connect. IFilterMapper2 interface traces provide detailed description on steps DirectShow takes in order to connect and/or render filter pins. For example when trying to render MEDIATYPE_Audio pin, Filter Mapper suggested “RDP DShow Redirection Filter” and, then, “Default DirectSound Device”:

FilterMapperSpy.h(186): CFilterMapperSpy::EnumMatchingFilters: nFlags 0x0, bExactMatch 0, nMinimalMerit 0x00200001, bInputNeeded 1, nInputTypeCount 1, pInputPinCategory NULL, bRender 1, bOutputNeeded 0, nOutputTypeCount 0, pOutputPinCategory NULL
FilterMapperSpy.h(191): CFilterMapperSpy::EnumMatchingFilters: nInputTypeIndex 0, MajorType {73647561-0000-0010-8000-00AA00389B71}, Subtype {00000000-0000-0000-0000-000000000000}
FilterMapperSpy.h(212): CFilterMapperSpy::EnumMatchingFilters: pMoniker @device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\{AB9D6472-752F-43F6-B29E-61207BDA8E06}
FilterMapperSpy.h(220): CFilterMapperSpy::EnumMatchingFilters: sFriendlyName "RDP DShow Redirection Filter", sDescription "", sDevicePath ""
FilterMapperSpy.h(212): CFilterMapperSpy::EnumMatchingFilters: pMoniker @device:cm:{E0F158E1-CB04-11D0-BD4E-00A0C911CE86}\Default DirectSound Device
FilterMapperSpy.h(220): CFilterMapperSpy::EnumMatchingFilters: sFriendlyName "Default DirectSound Device", sDescription "", sDevicePath ""

Important is that DirectShow’s internals are using the mapper through COM instantiation and this provides a safe method to override default behavior process wide in order to, for example, extend Intelligent Connect functionality onto custom, unregistered globally, private filters.

Also, the binary is renamed from FilterGraphSpy.dll to DirectShowSpy.dll.

Partial Visual C++ .NET 2008 source code is available from SVN, release binary included (Win32, x64); installation instructions are in another post.

19 Replies to “DirectShow Spy: Filter Mapper Spy”

  1. I noticed that with the latest release DirectShowSpy.dll rev187, the crash in COM surrogate process has been resolved and thank you for this.

    I noticed another problem with MediaPlayer Classic Home Cinema, when selecting the external filters crashes.

    is possible to solve this problem?


  2. I noticed another problem with MediaPlayer Classic Home Cinema, when selecting the external filters crashes.

    is possible to solve this problem?

    Sure. Will you please provide me step by step instructions how to reproduce the problem?

  3. The procedure is very simple.

    1 – Register the DLL (regsvr32 / s DirectShowSpy.dll)
    2 – Open MPCHC, right click> Options> External filters

    At this point MPCHC crashes, if I cancel the registration (regsvr32 / u DirectShowSpy.dll), works quite regular


  4. I don’t have this problem, I am using MPC-HC version 1.3.1249.0. EXternal Filters opens just fine, thought I don’t have any filters listed there. Do you have a “C:\ProgramData\DirectShowSpy.log” created/populated at the time of crash? Or perhaps you can attach with debugger and provide call stack and/or crash minidump.

  5. OK I see now. Actually from my point of view it’s a problem of either DirectShow core, or Media Player Classic. I think more likely is the latter (it’s using deprecated IAMFilterData, but losing COM interface reference from it). But I think I will want to make a workaround for this.

  6. good morning

    Wonder if you can disable the creation of log files.

    Often using DVDs or other Shirnk playermultimediali the log file can grow to a size of many gigabytes.

    you can solve this problem?


    • Log files (at least in the most recent build) don’t increase infinitely. At some point they are automatically truncated, cut-off size is currently 0.25 GB.

      Which version of spy DLL you are using?

Leave a Reply