Search code examples
directshow

How to get the default filter name for an unregistered DirectShow filter


I'm loading some unregistered DirectShow filters manually from a DLL by CLSID and I'd like to find out the name of the filter (as it appears in GraphEdit).

I've tried using the IBaseFilter:QueryFilterInfo method but that only appears to work when the filter is part of a graph and even then, it returns the name that was given to the filter when the filter was added to the graph.

I'm looking for the default name that the filter would have when an instance of it is added to a graph in GraphEdit. Is it possible to get that, and how?


Solution

  • Filter graph assigns unique name to the filter when filter is joining the graph. The name can be suggested by filter adder, then in case of collision filter graph might append a number as a suffix. When no name is given by the adder, filter graph takes "default" name from QueryFilterInfo or from filter registration information, where friendly name was also a part of registration.

    The registration names are managed by Filter Mapper, and accessible there programmatically. Then in turn it keeps the information in registry under category keys, esp. HKEY_CLASSES_ROOT\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance key.