Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello,

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
Comments
Sergey Alexandrovich Kryukov 20-Feb-12 14:42pm    
Just a note: it is not called "real time".
--SA
Sergey Alexandrovich Kryukov 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.)
--SA

1 solution

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,
—SA
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 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
Sergey Alexandrovich Kryukov 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.
--SA
Sergey Alexandrovich Kryukov 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...
--SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900