[MPlayer-dev-eng] [PATCH] reduce latency for ao_pulse

Dan Oscarsson Dan.Oscarsson at tieto.com
Tue Jul 13 08:44:51 CEST 2010


mån 2010-07-12 klockan 19:50 +0200 skrev Reimar Döffinger:
> On Mon, Jul 12, 2010 at 06:38:27PM +0200, Dan Oscarsson wrote:
> > mplayer uses a call get_delay to the ao when calculation the playing
> > pts. When trying to get good pts values I found that when using ao pulse
> > the call get_delay returned wrong answers a short while after a pause or
> > a seek. My analysis showed that pulseaudio calculates latency in, from
> > what I can see, wrong way - especially just after a pause or a seek. The
> > only way, I have found out, to reduce the bad values are to request
> > pulseaudio to reduce its latency.
> 
> 
> I really don't like the idea of adding hacks to work around pulseaudio bugs,
> particularly since pulseaudio is already only barely acceptable CPU-usage
> wise and I suspect this approach may further increase the CPU usage of it.

It might increase its CPU usage, though not that I have noticed it.
I have tried to get the pulseaudio developers to understand the problem,
but got no good answer.

> It might be worth checking if -autosync can handle this already and if not
> if it can be extended to cover this issue.

What I want it to avoid a-v out of sync after pause and seek, and
changes in frame display rate. It cannot be fixed by autosync as the
problem is that pulseaudio reports a "get_delay" that do not match what
it should be so mplayer calculates wrong playing audio pts.
You could change get_delay for pulseaudio - but that is much more
complex and more of a real hack.

   Dan



More information about the MPlayer-dev-eng mailing list