1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-30 11:02:10 +00:00

-cache option to enable cache and set buffer size

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2333 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-10-21 12:42:59 +00:00
parent 41ef04a130
commit cdeb0b0380
2 changed files with 8 additions and 1 deletions

View File

@ -198,6 +198,11 @@ struct config conf[]={
{"vc", &video_codec, CONF_TYPE_STRING, 0, 0, 0},
{"dshow", &allow_dshow, CONF_TYPE_FLAG, 0, 0, 1}, // Is this still needed? atmos ::
{"nodshow", &allow_dshow, CONF_TYPE_FLAG, 0, 1, 0},
#ifdef USE_STREAM_CACHE
{"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 4, 65536},
#else
{"cache", "MPlayer was compiled WITHOUT cache2 support", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
#endif
{"vcd", &vcd_track, CONF_TYPE_INT, CONF_RANGE, 1, 99},
#ifdef USE_DVDREAD
{"dvd", &dvd_title, CONF_TYPE_INT, CONF_RANGE, 1, 99},

View File

@ -222,6 +222,8 @@ static int vcd_track=0;
static char *stream_dump_name=NULL;
static int stream_dump_type=0;
static int stream_cache_size=0;
extern int dvd_title;
// AVI demuxer params:
@ -757,7 +759,7 @@ play_next_file:
inited_flags|=INITED_STREAM;
stream->start_pos+=seek_to_byte;
stream_enable_cache(stream,2048*1024);
if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024);
use_stdin=filename && (!strcmp(filename,"-"));