views:

251

answers:

2

I want to look for some source codes about directshow, which implement this feature : Implement one image process filter for two input video source pins, and render the result.

For example, open two video files, process each frame from two videos , then composite those two frames into only one output frame.

Are there any existing filter implementation or framework source codes ?

Thanks

+1  A: 

Just implement 2 pins for input connections. Get a sample from DirectX SDK and change input pin number to 2 if it's only one.

Also found some doc and sample for you here.

Francis
thanks for your blog. that give me one key words "muxer".If you share the whole workspace for your muxer class as demo, that will be awesome , I think.
Forrest
that's not my blog - I just found it on web.
Francis
A: 

You can use the stock VMR filter to perform alpha-blending without any special code, as long as you are only going to render the output. Just feed the two videos into separate pins on the same VMR instance.

If you want to save the mixed output, you'll need to do the mixing yourself (or write a custom allocator-presenter plugin for the VMR filter).

G

Geraint Davies