开发者

How to write directshow filter to process two input sources?

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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜