[Mplayer-cvslog] CVS: main/libmpdemux network.c,1.30,1.31
Bertrand Baudet
bertrand at mplayer.dev.hu
Tue Jan 22 07:12:20 CET 2002
- Previous message: [Mplayer-cvslog] CVS: main ducktm1.c,NONE,1.1 Makefile,1.143,1.144 codec-cfg.c,1.63,1.64 codec-cfg.h,1.37,1.38 dec_video.c,1.87,1.88
- Next message: [Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.38,1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv8573/libmpdemux
Modified Files:
network.c
Log Message:
Modified the cache option value setting/reading, so we can report
in any case the cache size value used.
Index: network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- network.c 21 Jan 2002 10:47:47 -0000 1.30
+++ network.c 22 Jan 2002 06:12:18 -0000 1.31
@@ -712,18 +712,30 @@
streaming_ctrl_free( stream->streaming_ctrl );
stream->streaming_ctrl = NULL;
} else if( stream->streaming_ctrl->buffering) {
- int ret;
+ int cache_size = 0;
+ int ret, val;
ret = m_config_is_option_set(mconfig,"cache");
if(ret < 0) {
- printf("Unable to know if cache size option was set\n");
+ printf("Unable to know if cache size option was set\n");
} else if(!ret) {
- // buffer in KBytes, *5 because the prefill is 20% of the buffer.
- if(m_config_set_int(mconfig,"cache",(stream->streaming_ctrl->prebuffer_size/1024)*5))
- printf("Cache size set to %d KBytes\n",(stream->streaming_ctrl->prebuffer_size/1024)*5);
- else
- printf("Unable to set the cache size option\n");
- } else
- printf("Cache size alredy set\n");
+ // cache option not set, will use the our computed value.
+ // buffer in KBytes, *5 because the prefill is 20% of the buffer.
+ val = (stream->streaming_ctrl->prebuffer_size/1024)*5;
+ if( m_config_set_int( mconfig, "cache", val )<0 ) {
+ printf("Unable to set the cache size option\n");
+ } else {
+ cache_size = val;
+ }
+ } else {
+ // cache option set, will use the given one.
+ val = m_config_get_int( mconfig, "cache", NULL );
+ if( val<0 ) {
+ printf("Unable to retrieve the cache option value\n");
+ } else {
+ cache_size = val;
+ }
+ }
+ printf("Cache size set to %d KBytes\n", cache_size );
}
return ret;
}
- Previous message: [Mplayer-cvslog] CVS: main ducktm1.c,NONE,1.1 Makefile,1.143,1.144 codec-cfg.c,1.63,1.64 codec-cfg.h,1.37,1.38 dec_video.c,1.87,1.88
- Next message: [Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.38,1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list