amanda
amanda

Reputation: 69

How to use/install custom Directshow filter

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

Upvotes: 6

Views: 11042

Answers (3)

CPlusSharp
CPlusSharp

Reputation: 891

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.

Upvotes: 3

kidjan
kidjan

Reputation: 1521

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.

Upvotes: 1

Cristian Adam
Cristian Adam

Reputation: 4834

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.

Upvotes: 6

Related Questions