How to use/install custom Directshow filter

坚强是说给别人听的谎言 提交于 2019-11-27 08:01:47

问题


I have custom compiled directshow filter - filter.DLL - but how to use, or install this filter in system?


回答1:


Usually you register the directshow filter into system by calling (from an elevated command prompt window on windows vista/7) regsvr32 filter.dll.

After the registration process you can use your filter with a directshow graph viewing application:

  • GraphEdit (graphedt.exe), installed by Windows SDK (ex. "c:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\graphedt.exe" )
  • GraphStudio

After testing your filter with the above programs you can use it in a C++/C# client application.




回答2:


The main way would be to register the filter file with regsvr32 filter.dll and than create the filter with it's CLSID in your application.

If the filter are in the same codebase as the application, you can just create the filter with new and use it.

I prefer to load the filter.dll with CoLoadLibrary to get the IClassFactory of the filter and create the filter. You can test this with GraphStudioNext. You can find sample source code to load a filter this way here.




回答3:


Like Cristian said, people typically register the filter on the system. But I prefer not to do this for a few reasons. In particular, see the section on "Registering Filters with the Operating System."

I think nine times out of ten, you're better off instantiating with new. See AppFilter on Geraint Davis' page for an example.



来源:https://stackoverflow.com/questions/3560855/how-to-use-install-custom-directshow-filter

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