Log in

View Full Version : Opening haali in c# (using DirectShowLib)


billou2k
26th February 2008, 19:08
I thought I managed to open Haali splitter fine with this code:

DirectShowLib.IGraphBuilder gb = null;
guid = new DsGuid("55DA30FC-F16B-49FC-BAA5-AE59FC65F82D");
comtype = Type.GetTypeFromCLSID(guid);
Vdemux = (DirectShowLib.IBaseFilter)Activator.CreateInstance(comtype);
hr = gb.AddSourceFilter(filepath, "Haali Media Aplitter", out (DirectShowLib.IBaseFilter)Vdemux);
rot = new DsROTEntry(gb);

But actually when checking with graphedit, it seems that it opens the default filter for the filepath specified instead of forcing Haali... (in my case, the mpeg files default source filter is Mainconcept and that is what is opened here).

If I replace Addsourcefilter with
hr = gb.AddFilter(Vdemux, "Haali Media Splitter");
Then in graphedit i have the Haali filter open but its "empty" and I can't find a way to set the source file...

Does anything make sense to anyone of you?
Thanks for your views.