I am currently working on an application that plays videos using the DirectShow filter. The application is written in WPF and uses MediaElements to play videos. While the DirectShow filter is registered, the video will play. For now, I'm just using regsvr32 to register the filter before playing it.
I was wondering if it is possible to load a filter from an embedded resource when the application starts? I am trying to avoid the need for administrator rights to register the filter.
Edit:
Ok, I'm trying to use this information and come up with a solution. You must excuse my lack of knowledge in DirectShow. I did not write a filter, I'm just trying to find a solution using it. I'm trying to do a little more research, so I understand DirectShow and its components a little better.
I found a convenient ComHelper class that I use to load a filter.
https://gist.github.com/jjeffery/1568627
I use the following code to instantiate a filter.
LibraryModule module = LibraryModule.LoadModule(@"filter.ax");
var comObject = ComHelper.CreateInstance(module, new Guid("c91aa7be-f627-46e3-b79f-2de55da46a8b"));
It is right? I'm trying to figure out where to go next. How can I use this to plot a filter?
source
share