Hi to all,

has anybody any idea how to obtain the current
display vertical frequency?

Thanxs in advance.

Bye Miracle

Posted on 2001-08-01 07:57:16 by miracle
Are you talking of the refresh rate ?

Posted on 2001-08-01 11:14:54 by JP?
The "refresh rate" is the vertical refresh rate of a monitor.
There are also the horizontal refresh rates, but people mainly look at the V-refresh rate as its the one we notice flicker on.

The "GetDeviceCaps" api may be the one you need, but it
notes "Windows NT only" on the VREFRESH item.
This may not still apply though, as my api help file is quite old...

I'm sorry I can't give you more help, but I've never used the api, so I can't give an example....

Posted on 2001-08-01 11:58:41 by Mirno
Thanxs anyway,

found a solution using IDirectDraw::GetMonitorFrequency :mad:
That way remembered Ernies COM-section to access this methods :grin:

Other question: Has anybody some experience to play videos synchronized on the hard way? Finished my own MPEG Video and Audio decoder but have no idea of a correct synchronized playback ..

SetTimer() etc. is not exact enough
timeBeginPeriod() not the proper way
Counting vertical refreshes in a thread consumpts to much time

Is anybody there who has idea?

Any help highly appreciated ..

Bye Miracle
Posted on 2001-08-01 12:34:01 by miracle
I kinda remember reading somethign once on using the multimedia timer for very exact timings.

Sorry, that's all I do remember.
Posted on 2001-08-01 17:38:23 by Ernie

thats what I thought too. Will perform some
tests but it seems that the multimedia timer via timeBeginPeriod() is not exact enough. :confused:

Because MPEG allows 23,976 Hertz frame rates as well as 24 Hertz etc. Counting the vertical display refreshes in an own thread consumpts to much time (more than the decoder) Changing the priority of the thread generally does not have much effect, has it??

Seems that there is no chance to turn a PC in a real multimedia machine. Anyway, maybe timeGetTime() is a solution to know what time really is ;)

Thanxs ..

Bye Miracle
Posted on 2001-08-02 05:10:14 by miracle
Are you trying to synchronize the display of the frames to the refresh
rate? That would be pretty hard, I guess. Under dos you could hook
the refresh IRQ, but probably not under windows :/. If you just need
exact timing, you *could* set up a thread that repeatedly calls
rdtsc, but that will chop away some CPU cycles. Oh well :).
Posted on 2001-08-02 21:02:34 by f0dder