Jump to content
  • Advertisement
Sign in to follow this  
toan1982

Help me! How to synchronize for play video and capture frame

This topic is 4575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

HI ALL, I am using DirectShow to build an application. the app will play a video file (avi or wmv) by call IMediaControl->Run(); and capture frame by call ISampleGrabber::GetCurrentBuffer. Now , I want to the app can 'synchronize' play video and capture. My mean is at the same time when have any frame was read then capture will be performed. My question is can we this job by create a CALLBACK function? And how to do this? And more, please show me if you have any sample about this. Thanks for any help.

Share this post


Link to post
Share on other sites
Advertisement
Take a look at the video mixing renderer. I haven't done a lot with it personally but it can render each frame into a direct3d surface and notify you when it's ready for display.

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/htm/usingthevideomixingrenderer.asp

a search on www.codeproject.com turned up some samples that use it

http://www.codeproject.com/audio/vmr9.asp

http://www.codeproject.com/directx/DirectShowVMR9.asp



Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!