Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Good afternoon, all! It's my first post, so hopefully it isn't too stupid or simple. Then again, maybe that would be a good thing for me :cool:

 

I'm currently writing a video player using DirectDraw, and I am curious as to which approach is suggested for timing the drawing of frames. So far, spawning a seperate thread and using the QueryPerformanceObject (or something like that) for obtaining a fairly precise timer has given me the best results, but I am seeing higher-than-usual CPU usage (higher than, say, using any other video player I've ever seen!) when I'm doing this. Is there something I'm missing that will allow me to time the rendering of frames that won't generate a ton of CPU overhead, while still allowing me to time them with enough precision to produce smooth video?

 

Just so you know, this is for a control to be placed on a form, it isn't full screen, if that makes any difference.

 

Thanks in advance for any help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...