Anton__

I posted a similar question some time ago, but still I can not find a good solution.

I am building a Graph using IFilterGraph2 interface. Currently I'm doing the following:

1) Calling AddSourceFilter in ordder to ged a source filter
2) Adding SampleGrabber filter
3) adding a NullRenderer filter

but this scenario does work for 2 or 3 media types. Other media types do not work. When I call AddSouceFilter on the file it returns with an error saying that it can not build a tree of intermediate filters.

Geraint Davies proposed to insert a demux filter between the source filter and the sample grabber, but how can I find out which demux filter and which source filter should be used for certain media type

GraphEdit somehow figures out which source filter and which demux/split filter to use... How the hell does it do that

Thanks
Anton


Re: DirectShow Development Building GraphBuilder for a randdom media type

Bowljoman

Doesnt it enumerate all the media types listed when the filter was regsvr32'ed

IFilterMapper2::EnumMatchingFilters might be of some use.





Re: DirectShow Development Building GraphBuilder for a randdom media type

Anton__

Ah cool..

so I have to get all matchinf source filters, all demux filters and then try to build a graph
Do you know where can I find any sample code about that
I'm really new to DS so all this stuff is confusing for me.

Thanks
Anton