[Mplayer-cvslog] CVS: main cfg-common.h, 1.134, 1.135 mencoder.c, 1.250, 1.251 mplayer.c, 1.761, 1.762

Ivan Kalvachev CVS syncmail at mplayerhq.hu
Fri Jul 16 22:31:19 CEST 2004


CVS change done by Ivan Kalvachev CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv7668

Modified Files:
	cfg-common.h mencoder.c mplayer.c 
Log Message:
cache min fill adjustment, based on patch by Jeremy Huddleston

Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- cfg-common.h	6 Jun 2004 13:44:23 -0000	1.134
+++ cfg-common.h	16 Jul 2004 20:31:15 -0000	1.135
@@ -10,8 +10,10 @@
 // ------------------------- stream options --------------------
 
 #ifdef USE_STREAM_CACHE
-	{"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 4, 65536, NULL},
+	{"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 32, 1048576, NULL},
 	{"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+	{"cache-min", &stream_cache_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
+	{"cache-prefill", &stream_cache_prefill_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
 #else
 	{"cache", "MPlayer was compiled without cache2 support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -r1.250 -r1.251
--- mencoder.c	8 Jun 2004 16:43:24 -0000	1.250
+++ mencoder.c	16 Jul 2004 20:31:16 -0000	1.251
@@ -105,6 +105,9 @@
 int stream_cache_size=-1;
 #ifdef USE_STREAM_CACHE
 extern int cache_fill_status;
+
+float stream_cache_min_percent=20.0;
+float stream_cache_prefill_percent=5.0;
 #else
 #define cache_fill_status 0
 #endif

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.761
retrieving revision 1.762
diff -u -r1.761 -r1.762
--- mplayer.c	14 Jul 2004 09:25:47 -0000	1.761
+++ mplayer.c	16 Jul 2004 20:31:16 -0000	1.762
@@ -255,6 +255,9 @@
        int stream_cache_size=-1;
 #ifdef USE_STREAM_CACHE
 extern int cache_fill_status;
+
+float stream_cache_min_percent=20.0;
+float stream_cache_prefill_percent=5.0;
 #else
 #define cache_fill_status 0
 #endif
@@ -1375,7 +1378,7 @@
 #endif
 if(stream_cache_size>0){
   current_module="enable_cache";
-  if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20))
+  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)))
     if((eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY))) goto goto_next_file;
 }
 




More information about the MPlayer-cvslog mailing list