[MPlayer-dev-eng] Prefetching/buffering files

Oded Shimon ods15 at ods15.dyndns.org
Fri Sep 2 20:26:17 CEST 2005


On Fri, Sep 02, 2005 at 02:15:35PM -0400, Nambiar, Anil wrote:
> Hi,
>             I am porting mplayer on our arm platform. It's a great player
> and so decided to choose this player for porting. 
>        While going through the code I noticed that mplayer is
> single-threaded. I searched through the net and found the reasons for which
> mplayer is single threaded. I don't want to argue, as some of the points
> made by the author are right. I can live with it being single-threaded. 
>             But I noticed another big problem with mplayer. It doesn't do
> prefetching or buffering for the files. The demuxer just reads data on
> demand, which might be ok for general systems (pc), but really sucks playing
> on embedded systems. I was having a lot of frame drops while playing a 1.6
> mbps avi file. Though the avg bitrate is 1.6 mbps, on close analysis I found
> that at some places it was as high as 5 mbps. The file was encoded using
> flask mpeg. Mplayer was not able to handle the peaks and there were a lot of
> frame drops. 
>             In demuxer.c I changed the code in function "ds_fill_buffer". It
> checks for packets and then performs read if no packet is available. I
> changed it to always read and then perform a check. This was there is some
> prefetching or buffering of data, before it is actually needed. It
> drastically reduced the frame drops. I have tested the change with a lot of
> files and have not observed any sync loss. 
>             In order to make mplayer play on the low-end embedded systems,
> prefetching data could make it much faster, than otherwise.

....
-cache ?


- ods15




More information about the MPlayer-dev-eng mailing list