[Mplayer-cvslog] CVS: main/Gui cfg.c,1.21,1.22 cfg.h,1.7,1.8 interface.c,1.58,1.59 interface.h,1.29,1.30
Zoltan Ponekker
pontscho at mplayerhq.hu
Mon Nov 25 19:18:48 CET 2002
Update of /cvsroot/mplayer/main/Gui
In directory mail:/var/tmp.root/cvs-serv14955/Gui
Modified Files:
cfg.c cfg.h interface.c interface.h
Log Message:
cache (buzeralas)
Index: cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- cfg.c 25 Nov 2002 16:22:37 -0000 1.21
+++ cfg.c 25 Nov 2002 18:18:43 -0000 1.22
@@ -39,6 +39,9 @@
char * gtkAOOSSMixer;
char * gtkAOOSSDevice;
+int gtkCacheOn = 0;
+int gtkCacheSize = 2048;
+
#ifdef HAVE_DXR3
char * gtkDXR3Device;
#endif
@@ -107,7 +110,9 @@
{ "font_autoscale",&subtitle_autoscale,CONF_TYPE_INT,CONF_RANGE,0,3,NULL },
#endif
- { "cache",&stream_cache_size,CONF_TYPE_INT,CONF_RANGE,-1,65535,NULL },
+ { "cache",>kCacheOn,CONF_TYPE_INT,CONF_RANGE,-1,65535,NULL },
+ { "cache_size",>kCacheSize,CONF_TYPE_INT,CONF_RANGE,-1,65535,NULL },
+
{ "load_fullscreen",>kLoadFullscreen,CONF_TYPE_FLAG,0,0,1,NULL },
{ "gui_skin",&skinName,CONF_TYPE_STRING,0,0,0,NULL },
Index: cfg.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cfg.h 2 Nov 2002 16:09:03 -0000 1.7
+++ cfg.h 25 Nov 2002 18:18:43 -0000 1.8
@@ -17,6 +17,9 @@
extern char * gtkAOOSSDevice;
extern char * gtkDXR3Device;
+extern int gtkCacheOn;
+extern int gtkCacheSize;
+
extern int gtkSubDumpMPSub;
extern int gtkSubDumpSrt;
Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- interface.c 25 Nov 2002 17:33:02 -0000 1.58
+++ interface.c 25 Nov 2002 18:18:43 -0000 1.59
@@ -77,6 +77,12 @@
return strdup( str );
}
+char * gstrchr( char * str,int c )
+{
+ if ( !str ) return NULL;
+ return strchr( str,c );
+}
+
void gfree( void ** p )
{
if ( *p == NULL ) return;
@@ -541,6 +547,9 @@
if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) btnSet( evSetMoviePosition,1 );
else btnSet( evSetMoviePosition,0 );
+
+ if ( gtkCacheOn ) stream_cache_size=gtkCacheSize;
+ else stream_cache_size=-1;
// -- audio
if ( audio_out )
Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- interface.h 2 Nov 2002 16:09:03 -0000 1.29
+++ interface.h 25 Nov 2002 18:18:43 -0000 1.30
@@ -193,6 +193,7 @@
extern int gstrcmp( char * a,char * b );
extern void gfree( void ** p );
extern void gaddlist( char *** list,char * entry );
+extern char * gstrchr( char * str,int c );
#define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
More information about the MPlayer-cvslog
mailing list