sirsergio

The problem is how to relocate my source filter that is created by GraphBuilder to filter I want

Brief desc: I have a source filter which registered to some format files. The files of protected format are simply wrappers of standart format files, for instance, wmv, avi, etc. Out pin of source filter delivers streamed data to downstream compartible filters that builds by GraphBuilder. I registered filter for using by Microsoft Media Player. During playback Media Player creates GraphBuilder, it, in its turn, creates source file -> OutPin. OutPin implements IStreamBuilder interface to let me build graph. Method "Render" clears my source filter if the file format is "wmv" (GraphBuilder can't find suitable tranform filter) then generates all chain of filters by calling RenderFile or RenderPin methods.
If I play my registered format file, mentioned method creates chain of filters to play avi file (for test purpose) and MediaPlayer plays avi file. It works Ok. But if I use wmv file in Render method, MediaPlayer is thrown an error "Reproduced file has extension (.zzz) that is not correspondent to format file...". Why How could I avoid that
Purpose of all my steps: clear GraphBuilder from my source filter and do so that GraphBuilder use other source filter instead of mine (WMVSyncReader, for example).

One more question.
Who knows how can it possible playing streamed wmv files through filters

Thanks for your time.


Re: DirectShow Development How to relocate source filter properly?

Geraint Davies

WMV files are normally played back using a combined source/parser filter, so if you replace the source filter, there is no separate parser that you can connect to. That's why your method fails.

The solution is to download the WMVParser sample from www.gdcl.co.uk which was written for precisely this situation. Once you've registered that filter, you will be able to render the output of your container-source filter.

G





Re: DirectShow Development How to relocate source filter properly?

sirsergio

It works. Thank you so much.