Jump to content
  • Advertisement
Sign in to follow this  

DirectShow changing graph clock

This topic is 3722 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

This might be a long shot for this forum but MSDN forums are acting up for me and I can't log in. I have an avi file playing no problem. I can seek, play, pause, etc. no problem. What I want to do is allow the user to play the video as fast as the system can handle, rather than limit to the video framerate. I can accomplish this by using IMediaFilter::SetSyncSource setting it to null. However, I would like to be able to turn this on and off (ie I have a button for 'Play' and 'Play Fast'). Unfortunately you can't call SetSyncSource or SetDefaultSyncSource while the graph isn't stopped. My attempted solution to this problem was to implement a new IReferenceClock object. I used SetSyncSource to set the graph clock to my new clock. This object used GetPerformanceFrequency/Counter to advance a clock, but it would scale time as I wanted to speed up and slow down. If I wanted it to run as fast as possible, I just had my timer run 100x of real time, and I figured the source would just go as fast as it could to keep up. No matter what I did though, the damn thing just kept on playing at real normal speed. Any ideas to achieve what I want?

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!