Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 34688 Details for
Bug 55936
mplayer cachefill option in mplayer.conf
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
mplayer-cacheprefill_option.patch
mplayer.patch (text/plain), 4.64 KB, created by
Jeremy Huddleston (RETIRED)
on 2004-07-02 22:06:59 UTC
(
hide
)
Description:
mplayer-cacheprefill_option.patch
Filename:
MIME Type:
Creator:
Jeremy Huddleston (RETIRED)
Created:
2004-07-02 22:06:59 UTC
Size:
4.64 KB
patch
obsolete
>diff -Naur MPlayer-1.0pre4.orig/cfg-common.h MPlayer-1.0pre4/cfg-common.h >--- MPlayer-1.0pre4.orig/cfg-common.h 2004-04-26 01:53:41.000000000 -0700 >+++ MPlayer-1.0pre4/cfg-common.h 2004-07-02 20:30:53.041126454 -0700 >@@ -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, 4, 262144, NULL}, > {"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL}, >+ {"cache_min", &stream_cache_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL}, >+ {"cache_prefill", &stream_cache_prefill_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL}, > #else > {"cache", "MPlayer was compiled WITHOUT cache2 support\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, > #endif >diff -Naur MPlayer-1.0pre4.orig/etc/example.conf MPlayer-1.0pre4/etc/example.conf >--- MPlayer-1.0pre4.orig/etc/example.conf 2004-01-13 01:55:40.000000000 -0800 >+++ MPlayer-1.0pre4/etc/example.conf 2004-07-02 20:32:14.577657287 -0700 >@@ -116,6 +116,8 @@ > # etc) > > cache = 8192 # use 8Mb input cache by default >+cache_min = 20.0 # Prefill 20% of the cache before initially playing >+cache_prefill = 5.0 # Prefill 5% of the cache before restarting playback if it empties > > # slang = en # DVD : display english subtitles if available > # alang = en # DVD : play english audio tracks if available >@@ -133,4 +135,4 @@ > ## Delete this default :) > ## > >-include = /home/gabucino/.mplayer/i_did_not_RTFM_carefully_enough... >+#include = /home/gabucino/.mplayer/i_did_not_RTFM_carefully_enough... >diff -Naur MPlayer-1.0pre4.orig/libmpdemux/cache2.c MPlayer-1.0pre4/libmpdemux/cache2.c >--- MPlayer-1.0pre4.orig/libmpdemux/cache2.c 2003-06-09 05:15:45.000000000 -0700 >+++ MPlayer-1.0pre4/libmpdemux/cache2.c 2004-07-02 20:42:25.923716544 -0700 >@@ -33,6 +33,8 @@ > int stream_fill_buffer(stream_t *s); > int stream_seek_long(stream_t *s,off_t pos); > >+extern float stream_cache_min_percent; >+extern float stream_cache_prefill_percent; > extern int mp_input_check_interrupt(int time); > > typedef struct { >@@ -207,7 +209,7 @@ > #endif > s->fill_limit=8*sector; > s->back_size=size/2; >- s->prefill=size/20; // default: 5% >+ s->prefill=size * stream_cache_prefill_percent / 100.0; > return s; > } > >diff -Naur MPlayer-1.0pre4.orig/libmpdemux/demuxer.c MPlayer-1.0pre4/libmpdemux/demuxer.c >--- MPlayer-1.0pre4.orig/libmpdemux/demuxer.c 2004-04-17 09:46:40.000000000 -0700 >+++ MPlayer-1.0pre4/libmpdemux/demuxer.c 2004-07-02 20:41:58.153299903 -0700 >@@ -1374,6 +1374,9 @@ > > extern int hr_mp3_seek; > >+extern float stream_cache_min_percent; >+extern float stream_cache_prefill_percent; >+ > demuxer_t* demux_open(stream_t *vs,int file_format,int audio_id,int video_id,int dvdsub_id,char* filename){ > stream_t *as = NULL,*ss = NULL; > demuxer_t *vd,*ad = NULL,*sd = NULL; >@@ -1386,8 +1389,8 @@ > return NULL; > } > if(audio_stream_cache) { >- if(!stream_enable_cache(as,audio_stream_cache*1024,audio_stream_cache*1024/5, >- audio_stream_cache*1024/20)) { >+ if(!stream_enable_cache(as,audio_stream_cache*1024,audio_stream_cache*1024*(stream_cache_min_percent / 100.0), >+ audio_stream_cache*1024*(stream_cache_prefill_percent / 100.0))) { > free_stream(as); > mp_msg(MSGT_DEMUXER,MSGL_ERR,"Can't enable audio stream cache\n"); > return NULL; >diff -Naur MPlayer-1.0pre4.orig/mencoder.c MPlayer-1.0pre4/mencoder.c >--- MPlayer-1.0pre4.orig/mencoder.c 2004-04-17 09:46:40.000000000 -0700 >+++ MPlayer-1.0pre4/mencoder.c 2004-07-02 20:32:57.003647915 -0700 >@@ -100,6 +100,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 >diff -Naur MPlayer-1.0pre4.orig/mplayer.c MPlayer-1.0pre4/mplayer.c >--- MPlayer-1.0pre4.orig/mplayer.c 2004-04-26 14:15:13.000000000 -0700 >+++ MPlayer-1.0pre4/mplayer.c 2004-07-02 20:38:51.404113892 -0700 >@@ -249,6 +249,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 >@@ -1368,7 +1371,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; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55936
:
34688
|
34695
|
34703
|
35984