[MPlayer-dev-eng] [PATCH] cache fill adjustment

Ivan Kalvachev ivan at cacad.com
Mon Jul 12 13:11:01 CEST 2004


Hi,
Sorry for the delay.
Here I attach an modified version of the patch made by Jeremy Huddleston.

Modifications include - prefill fix. It looks that prefill have been calculated
wrongly (size*prefill - where both are in bytes). This error have been left
unnoticed because of one very stuped reason.  PREFILL IS NOT USED!
Yeh, the code that should pause mplayer is simply missing.
After fixing this bug I was able to remove the new extern variables.

I have done and buffer_size calculation modifications, mainly to ensure
that the cache will always be 2 times bigger than fill_limit (that is 2 times
bigger than the amount bytes readed at once)

I have left the default extension of cache size minum. But I think
There is not a problem to set it about 1GB (the cache system need a sing
calculations, and from 4GB  it drops to 2. With one bit
safe for overflow ->1GB. For people with enough ram and CD-ROMs it is enough.
BTW DVD's are usually bigger than 4GB.
The limit of 4GB comes from 32 bit pointer arithmetic.

Take a look of the patch and test it.
If pre5 is going to be released today or tommorow, i would like to apply it
after release. Just for any case:)

Wish You Best
   Ivan Kalvachev
  iive


> Chris White said:
>> Patch created by: Jeremy Huddleston
>>
>> [Description]
>>
>> "I created a patch which allows the user to set the percentage full the
> cache reaches before playback.  Default is set to the current hardcoded
> value (5% / 20%)"
>>
>> "The default is for the prefill value to be a percentage (20% initial / 5%
>> on
>> restart) of the cache size, but when you increase to larger caches for
>> better
>> network streaming, the fill time increases proportionally... and at 256M the
> 20% becomes unreasonable."
>>
>> [Altered Files]
>>
>> -example.conf to show usage.
>> -cfg-common.h to adjust stream options
>> -libmpdemux/cache2.c adjusts internal cache handling
>> -libmpdemux/demuxer.c adjust demux handling with caching enabled -mencoder.c
> adjusts mencoder's stream handling
>> -mplayer.c adjusts mplayer's core streaming options
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prefill_cache.patch
Type: application/octet-stream
Size: 5838 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040712/c7c4fe27/attachment.obj>


More information about the MPlayer-dev-eng mailing list