[MPlayer-dev-eng] Fixes/enhancements to vdpau

Dan Oscarsson Dan.Oscarsson at tietoenator.com
Thu Apr 9 19:11:22 CEST 2009


On 2009-04-09 at 19:19 +0300 Uoti Urpala wrote:
> On Thu, 2009-04-09 at 09:07 +0200, Dan Oscarsson wrote:
> > What I really need is a way to have mplayer sync to video time (vsyncs)
> > instead of audio card time. To do this mplayer have to be able to change
> > speed of audio in very small increments. I have tried doing this by
> > doing a reinit_audio_chain but even a very small change makes mplayers
> > timing change to much to handle frame display correctly. Multiple
> > threads could make it work.
> 
> I don't know how you imagine threads helping with that, but I'm pretty
> sure you're wrong. If you don't know how to implement that without
> threads then you will not be able to implement it with threads either.

By having decoding in one thread and syncing in an other you can handle
that sometimes decoding takes more than one vsync interval to do.

I did a quick test on my computer to see how audio timing corresponds to
system time and it looks like about 5 ms difference in 18 minutes. My
graphics card have about 56 ms difference in the same time period.

So at least my audio hardware keeps time close to system time than my
graphics card.

Anyway, as you are the expert on mplayer, do you have any suggestion on
how to make mplayer play a movie with a fps of 23,976hz on a screen
running at 23,976hz without frame dropping. While both say they are
using the same rate my tests show that it differs a little which results
in mplayer having to drop frames to keep audio in sync with audio.
My code tries to adjust fps of movie to match true fps of screen.
What do you think I should do and what parts of mplayer should I look at
to modify?





More information about the MPlayer-dev-eng mailing list