[Fons Adriaensen]
Input the vertical video sync signal via the audio card
and analyse
its timing in terms of audio samples (e.g. using a DLL). This will
enable you to predict where the next sync will be in the audio input.
Back in the 80s, the humble Commodore 64 could be readily programmed
to fire an interrupt on vertical sync. Have 20 years of progress
really deprived us of this fine feature, or is it just missing from X?
Cheers, Tim