How to find the IMoniker used to create a source filter?

和自甴很熟 提交于 2020-01-05 06:27:12

问题


Currently I'm writing a DirectShow based application that should help users configuring their TV capture cards, since GraphEdit seems to be too difficult for most to understand. The idea is that this application exports the generated Graph to a .GRF file, that will be used in another application.

Users can select which device (IMoniker) should be used to create a source filter, and can change some settings regarding video / audio.

Next to exporting .GRF files, my application should also have the feature to import such files. My question is: how do I find what moniker / device was used to create the source filter in the imported graph?

I tried creating a list of source filters for all connected devices, and comparing those to the source filter in the imported graph, but that did not seem to work.


回答1:


You cannot tell moniker from created instance. To distinguish between monikers and be able to find the one you need, use their IMoniker::GetDisplayName string as a unique persistent identifier.



来源:https://stackoverflow.com/questions/13254440/how-to-find-the-imoniker-used-to-create-a-source-filter

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