Click here to Skip to main content
12,690,140 members (32,371 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ MFC directshow

I have just started off a little bit of programming with Directshow.
What I can do quiet easily is link up IGraphBuilder to a few filters such as IMediaControl, IBaseFilter, IVMRWindowlessControl, etc and play an avi file from the local harddrive by using a pGraph->RenderFile(..) function.

This is all good, however, now I am faced with a problem where I have an array of frames in RAM, I want to do some processing on them , and I want to render them on a directshow surface.

However, I do NOT want to save it to a temporary avi file, I want to render these frames "as they come". (real-time)

I have googled and went on codeproject, most of the implementations are using the RenderFile() function, which is something I do not want to do as saving frames to a Tmp folder first will cause a lot of delays.

I would really appreciate some help from you guys, I am a bit lost here :(
Posted 20-Feb-12 9:24am
SAKryukov 20-Feb-12 14:42pm
Just a note: it is not called "real time".
SAKryukov 20-Feb-12 14:48pm
Nevertheless, the question is interesting enough; and your understanding that using temporary files is bad, so I voted 5 for the question. (And gave an advice in my answer.)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Of course you should not use temporary files. This is a pretty big topic though.

I hope this cycle of three CodeProject articles can help you to understand the techniques involved:
DirectShow Filters Development Part 1: Video Rendering with Direct2D[^],
DirectShow Filters Development Part 2: Live Source Filter[^],
DirectShow Filters Development Part 3: Transform Filters[^].

Good luck,
SAKryukov 21-Feb-12 5:19am
[OP commented, the comment moved from the "solution" which needs to be removed:]

Hi SA,

thanks a lot for your guidance, I will go through the codeproject articles that you put up.
Do you reckon this is a very long project for somebody who is just starting out on DirectShow.

P.S. thanks for the correction reg. Real time
SAKryukov 21-Feb-12 5:21am
You are very welcome.

I hope you can accept this answer formally (green button).

Please do not post comments like this one as a "solution": it is not a solution, will be removed, no one will get e-mail notification (but if you comment on a post or another comment, all original authors of the post will be notified), so, use comments or "Improve question".

Good luck, call again.
SAKryukov 21-Feb-12 5:24am
About the size and difficulty of the project -- I don't know, it depends on the scope of the application. This topic is relatively complex and difficult for development. I use more of WPF which provides much smoother programming model for such things, but perhaps less flexibility -- hard to say...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170117.1 | Last Updated 20 Feb 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100