Re: [MPlayer-dev-eng] Adding threaded functionality to mplayer

Jiri Svoboda Jiri.Svoboda at seznam.cz
Wed Sep 1 14:38:16 CEST 2004


> On Wed, Aug 25, 2004 at 01:18:10PM +0100, Ed Wildgoose wrote:
> > What would people say to adding multithreaded coding to mplayer?  The 
> > idea would be to run the audio decoder and video decoder in their own 
> > seperate threads. 
> 
> A few reasons already given at another thread.
> 
> > The video thread basically just needs to block periodically until it 
> > gets synchronised with some external sync code to display the next 
> > frame.  This can happen from a combination of the main event loop, audio 
> > thread and any external sources (RTC, etc).
> 
> No, video needs to be synchronized to audio. Otherwise you'll either
> destroy A/V sync or have to resample audio to sync to another source.
> Believe me, the second approach isnt worth the effort.

Some time ago (actually long time in mplayer development) i´ve tried to split mplayer into two threads. And I _was_ sucesfull. Actually the code wasn´t big (I think less then 50 lines added) but it was very big hack and I think the way I did it cant be used anymore. I´ve gained some performance boost - not very big but worth of effort. Interesting think was that same performance boost i´ve gained if I splitted video decoder and frame displaying into two threads. It seem that on my machine copy from RAM to video RAM is quite slow that it occupies significant amount of time.
All of these tests were done on my two processor machine (2x celeron 460).

     

      JS
____________________________________________________________
Anonymní připojení k internetu od Seznamu
http://ad.seznam.cz/clickthru?spotId=74638




More information about the MPlayer-dev-eng mailing list