I'm trying to build a video player application for specific purpose using DirectShow. I've got stuck quite early - I cannot even connect filters into a graph.
1. filter is async file reader. Loading a file succeeds. It has one output pin with MEDIATYPE_Stream, as expected.
2. filter is Haali Media Splitter (AR). Async file reader connects successfully to Splitter. Splitter has two output pins, video and audio.
3. filter is ffdshow Video Decoder. It has an input pin accepting video. Connecting splitter's video output with MEDIATYPE_Video to decoder's video input fails with hr=0x80040217 (cannot connect pins, neither directly nor using Intelligent Connect feature).
I have a log file set for IGraphBuilder, but it doesn't seem that it contains any useful information - it's just a list of several unsuccessful pin connection attempts.
The same thing works perfectly in GraphStudioNext - all the filters connect as described, as well as further to the renderer. Haali and ffdshow are able to connect directly. Also the graph plays successfully.
I've tried printing out media subtypes, filter clsids, etc, as far as I can see I really am using same identical filters and their pins just like GraphStudioNext. But the same graph simply can't be built in my application.
I will be grateful for any hint what I'm doing wrong?
Basically what I want to do is: [file reader]-[splitter]-[video decoder]-[sample grabber]-[video renderer]. I'll render audio too, audio renderer branch is omitted for simplicity. For unknown reason, I can build even several variations of a graph like that i GraphStudioNext, but nothing works in my code, everything seems stuck on [splitter]-[video decoder] connection. I've also tried LAV splitter instead of Haali and LAV decoder instead of ffdshow - but they all work elsewhere.
I have also tried both CoCreateInstance and IMoniker->BindToStorage() approaches regarding loading filters - both seem to create identical filters, nothing works. :-( At some later time, I'll make list of available splitters, decoders and renderers visible to user; for now it's enough if it works on my development machine (Win7 Pro x64).