How to make directShow to Create graph automatically with available filters

让人想犯罪 __ 提交于 2021-02-11 13:30:57

问题


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


回答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.



来源:https://stackoverflow.com/questions/37102980/how-to-make-directshow-to-create-graph-automatically-with-available-filters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!