PDA

View Full Version : How to load a DS filter without registering


lol_123
1st July 2008, 14:26
Does anyone know how to load a DS filter directly and bypass the usual registry-based filter enumeration?
Built-in is not counted.

Thanks, -L

foxyshadis
2nd July 2008, 00:19
What exactly do you mean by 'load'? Since this is avisynth forum, I assume you might want to use it for decompressing a video - to do that you'd have to create your own plugin (copying directshowsource is probably easiest) with the code to load the filter. It's not terribly hard, but you'll have to know C++ to do it.

IanB
2nd July 2008, 02:34
IGraphBuilder* gb;
IBaseFilter* example;

CoCreateInstance(CLSID_FilterGraphNoThread, 0, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void**)&gb);

example = new filter(); // Create instance of interesting filter

gb->AddFilter(example, L"Example");The red code is where you need to work some magic like loading the .DLL and getting the filters create entry point and calling it appropriatly.

lol_123
2nd July 2008, 15:23
IGraphBuilder* gb;
IBaseFilter* example;

CoCreateInstance(CLSID_FilterGraphNoThread, 0, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void**)&gb);

example = new filter(); // Create instance of interesting filter

gb->AddFilter(example, L"Example");The red code is where you need to work some magic like loading the .DLL and getting the filters create entry point and calling it appropriatly.
Thanks IanB, actually what i am trying to do is to make minimal change to current MPC archetecture, and make MPC load codecs without registing them.

clsid
2nd July 2008, 20:39
That is something that MPC already is able to do...
...and is totally unrelated to AviSynth.

mplayerc.exe /filter "filtername"

(See MPC Help menu, command-line switches)

chriszxl
1st August 2008, 07:05
this is an interesting question to me...learn...