[MPlayer-dev-eng] Fixes/enhancements to vdpau
Uoti Urpala
uoti.urpala at pp1.inet.fi
Thu Apr 9 21:03:45 CEST 2009
On Thu, 2009-04-09 at 19:11 +0200, Dan Oscarsson wrote:
> 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.
You're mixing up completely different issues. Threads can help you keep
the CPU decoding around the time where you need to flip video frames.
They will not help you sync audio with any other time source.
> 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?
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.
More information about the MPlayer-dev-eng
mailing list