Sign in to follow this  
AnAss

DirectShow changing graph clock

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this