[MPlayer-dev-eng] Patch: Low latency audio enhancements
Attila Kinali
attila at kinali.ch
Sat Aug 28 07:00:42 CEST 2004
On Wed, Aug 25, 2004 at 12:27:20PM +0100, Ed Wildgoose wrote:
> Turning the question around, what did the original code do? If we
> *NEEDED* to wait *less* than 10m, then say "stuff it" and wait a whole
> 10ms anyway, what will happen...?
Alex ? Ivan ?
> One way to solve this is to have a seperate thread supplying audio data
> and then this can run at it's own best pace and simply block on writing
> audio data. This will free the video loop from needing to keep such a
> tight scheduling deadline. Actually, taking this further you could move
> the video display code into it's own thread and just have the main event
> loop spin around on it's own.
>
> ...Is there any resistance to adding threads to mplayer? Do we support
> architectures that can't handle a multi threaded player?
Yes, there is a huge resistance.
* The current a/v sync code syncs video to audio. This wont work if
audio is in a speperate thread.
* Threading makes application slower on single cpu machines and even on
SMP machines, it may not improve the cpu usage as mutlithreading leads
to more cache misses. Please remember that MPlayer is mostly I/O limited
rather than CPU limited.
* Threading is complicated to deal with. There is a lot of stuff you
have to keep i mind and synchronisation of threads at <<10ms is not the
easiest thing to do.
> I am (unfortunately) becoming quite experienced at it. My latest bit of
This is rather fortunate :)
> In conclusion I am happy to help with audio maintenance, but I would
> still prefer to commit changes via someone else who can audit them for
> logic cockups - I haven't been playing with Mplayer code for that long.
Please do so, we are in need of people with knowldeg in different
aspects of video playing/coding. And especialy the audio part lacks
a maintainer for a long time.
About your patch, it has to be review by someone who can tell whether
there are side effects or not, currently only Alex, Rich and Ivan can
do this afaik. Alex is kinda busy these days, Rich just came back from
a long trip and thus will need some time to catch up and Ivan....
yes, Ivan, what are you doing ? :)
Attila Kinali
More information about the MPlayer-dev-eng
mailing list