Mercurial > mplayer.hg
comparison mplayer.c @ 12835:4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
author | iive |
---|---|
date | Fri, 16 Jul 2004 20:31:17 +0000 |
parents | fba780800efe |
children | 96b807836eca |
comparison
equal
deleted
inserted
replaced
12834:c457b1e671a7 | 12835:4235ae5a2d60 |
---|---|
253 | 253 |
254 // cache2: | 254 // cache2: |
255 int stream_cache_size=-1; | 255 int stream_cache_size=-1; |
256 #ifdef USE_STREAM_CACHE | 256 #ifdef USE_STREAM_CACHE |
257 extern int cache_fill_status; | 257 extern int cache_fill_status; |
258 | |
259 float stream_cache_min_percent=20.0; | |
260 float stream_cache_prefill_percent=5.0; | |
258 #else | 261 #else |
259 #define cache_fill_status 0 | 262 #define cache_fill_status 0 |
260 #endif | 263 #endif |
261 | 264 |
262 // dump: | 265 // dump: |
1373 #ifdef HAS_DVBIN_SUPPORT | 1376 #ifdef HAS_DVBIN_SUPPORT |
1374 goto_enable_cache: | 1377 goto_enable_cache: |
1375 #endif | 1378 #endif |
1376 if(stream_cache_size>0){ | 1379 if(stream_cache_size>0){ |
1377 current_module="enable_cache"; | 1380 current_module="enable_cache"; |
1378 if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20)) | 1381 if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024*(stream_cache_min_percent / 100.0),stream_cache_size*1024*(stream_cache_prefill_percent / 100.0))) |
1379 if((eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY))) goto goto_next_file; | 1382 if((eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY))) goto goto_next_file; |
1380 } | 1383 } |
1381 | 1384 |
1382 //============ Open DEMUXERS --- DETECT file type ======================= | 1385 //============ Open DEMUXERS --- DETECT file type ======================= |
1383 current_module="demux_open"; | 1386 current_module="demux_open"; |