[MPlayer-dev-eng] Fixes/enhancements to vdpau
Dan Oscarsson
Dan.Oscarsson at tietoenator.com
Fri Apr 10 19:00:33 CEST 2009
On 2009-04-09 at 22:03 +0300 Uoti Urpala wrote:
> You'd need to add a way to modify the length of the audio stream when
> it's going out of sync, adding or removing a given amount of samples,
> without distorting the sound too badly.
That I could do to have audio sync to video but in this case I want to
sync video to the vsync rate so that the movie is in sync with the
vsyncs. I see no way I can go into the audio parts of mplayer and try to
modify length of audio stream - I have not the time and do not think it
would work well. My current solution to change the movie speed to match
the vsync speed (when they are nearly the same) works very well without
any distortion of sound or video.
-
My fixes includes two parts:
1) handling frame drops when video frames comes quicker than screen can
display them. A quick test with my current code shows that running with
speed 2.5 on a 60hz screen results in:
Normal mplayer code:
A: 60.0 V: 57.6 A-V: 2.404 ct: -0.078 0/ 0 0% 100% 1.7% 1250 0
My code:
A: 60.0 V: 60.0 A-V: -0.000 ct: -0.078 0/ 0 0% 0% 1.6% 0 0 60
The difference is that normal code have audio out of sync and 1250
"frame drops in decoding" while my code have audio in sync and 60 frames
dropped.
Running at speed 2.5 simulates the problem you get when frame rate is
equal to or higher than vsync rate.
At normal speed neither drops any frames.
2) reading the speed of vsyncs and adjusting the speed of the movie to
match. This to avoid frame drops when frame rate is nearly equal to
vsync rate. This happens when you play a 24hz move on a 24hz tv.
Currently my fixes works fine on my tv and computer. I cannot say how
they works with other graphics and audio hardware.
More information about the MPlayer-dev-eng
mailing list