0

I want to use the Medialooks multisource filter in my application, This has entry in HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\ But still i have to Add this filter manually using CLS_ID and AddFilter Function.

Is there any way so that Renderfile function of Dshow will automatically creates a graph by enumerating the filters from registry

Checked in Grphedt tool but if i manually insert and connect Filters I can play the videos properly.Otherwise it wont render automatically by building the graph

Gajukorse
  • 147
  • 2
  • 11

1 Answers1

1

Ability yo connect filters and obtain a topology of your interest is one thing, and having this sort of connection taking place during Intelligent Connect is another thing. For Intelligent Connect and RenderFile the filters of interest must be apparently registered, and then they have accurate DirectShow registration details: merit, media types. Quite so often filters are lacking this registration (and at other times they are "over-registrating" themselves so that they are picked up when they are obvious misfit).

Even though you can re-register filter yourself (see IFilterMapper2::RegisterFilter) with alternate registration details, you typically do not do it. It's filter developer's business to register accurately. The better alternative for you is to build graph using AddFilter calls where you have fine control over graph construction. Or you might want to do it as a fallback construction method if RenderFile fails in first place.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • How can i confirm filter is registered properly or not ? – Gajukorse May 09 '16 at 13:58
  • You can review the registration with GraphEdit, GraphStudioNext or similar. Then compare to [Guidelines for Registering Filters](https://msdn.microsoft.com/en-us/library/windows/desktop/dd388793) and decide whether it is proper or not. Whether it matches the intention and what is supposed to be done by developer, or rather looks like a bug or inaccuracy. – Roman R. May 09 '16 at 14:17
  • I found like merit or filter is set to MERIT_DO_NOT_USE(0x002000) from grphedit tool .This is a source filter .Can i change the merit of filter myself ? – Gajukorse May 09 '16 at 14:49
  • `IFilterMapper2::RegisterFilter` already mentioned above, or interactively using [GraphStudioNext](https://github.com/cplussharp/graph-studio-next). – Roman R. May 09 '16 at 15:58