Mercurial > mplayer.hg
changeset 1448:e795527de16a
-quiet option patch by Adam Tla/lka atlka@pg.gda.pl
author | arpi |
---|---|
date | Mon, 06 Aug 2001 00:30:29 +0000 |
parents | e82fbd67ae60 |
children | 302ba4bf5095 |
files | cfg-mplayer.h mplayer.c |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-mplayer.h Mon Aug 06 00:22:44 2001 +0000 +++ b/cfg-mplayer.h Mon Aug 06 00:30:29 2001 +0000 @@ -196,6 +196,7 @@ {"idx", &index_mode, CONF_TYPE_FLAG, 0, -1, 1}, {"forceidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 2}, + {"quiet", &quiet, CONF_TYPE_FLAG, 0, 0, 1}, {"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100}, {"v", cfg_inc_verbose, CONF_TYPE_FUNC, 0, 0, 0}, {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
--- a/mplayer.c Mon Aug 06 00:22:44 2001 +0000 +++ b/mplayer.c Mon Aug 06 00:30:29 2001 +0000 @@ -86,6 +86,7 @@ int nogui=1; #endif int verbose=0; +int quiet=0; #define ABS(x) (((x)>=0)?(x):(-(x))) @@ -1146,7 +1147,7 @@ // audio_delay,audio_buffer_delay,a_pts,sh_audio->timer); printf("START: a_pts=%5.3f v_pts=%5.3f \n",d_audio->pts,d_video->pts); } - delay_corrected=0; // has to correct PTS diffs +// delay_corrected=0; // has to correct PTS diffs d_video->pts=0;d_audio->pts=0; // PTS is outdated now! } else { pts_from_bps=0; // it must be 0 for mpeg/asf ! @@ -1454,7 +1455,8 @@ if(delay_corrected){ float x=frame_correction=(a_pts-delay-audio_delay)-v_pts; // printf("A:%6.1f V:%6.1f A-V:%7.3f",a_pts-audio_delay-delay,v_pts,x); - printf("A:%6.1f (%6.1f) V:%6.1f A-V:%7.3f",a_pts,a_pts-audio_delay-delay,v_pts,x); + if(!quiet) + printf("A:%6.1f (%6.1f) V:%6.1f A-V:%7.3f",a_pts,a_pts-audio_delay-delay,v_pts,x); x*=0.1f; if(x<-max_pts_correction) x=-max_pts_correction; else if(x> max_pts_correction) x= max_pts_correction; @@ -1463,7 +1465,7 @@ else max_pts_correction=sh_video->frametime*0.10; // +-10% of time sh_audio->timer+=x; c_total+=x; - printf(" ct:%7.3f %3d %2d%% %2d%% %4.1f%% %d %d\r",c_total, + if(!quiet) printf(" ct:%7.3f %3d %2d%% %2d%% %4.1f%% %d %d\r",c_total, (int)sh_video->num_frames, (sh_video->timer>0.5)?(int)(100.0*video_time_usage/(double)sh_video->timer):0, (sh_video->timer>0.5)?(int)(100.0*vout_time_usage/(double)sh_video->timer):0, @@ -1477,6 +1479,7 @@ } else { // No audio: + if(!quiet) printf("V:%6.1f %3d %2d%% %2d%% %3.1f%% \r",d_video->pts, (int)sh_video->num_frames, (sh_video->timer>0.5)?(int)(100.0*video_time_usage/(double)sh_video->timer):0,