# HG changeset patch # User arpi # Date 997057829 0 # Node ID e795527de16a11b8ed93e1c5b38bc93f162565c4 # Parent e82fbd67ae6088b9f2d8945d82ddd8d17587023f -quiet option patch by Adam Tla/lka atlka@pg.gda.pl diff -r e82fbd67ae60 -r e795527de16a cfg-mplayer.h --- 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}, diff -r e82fbd67ae60 -r e795527de16a mplayer.c --- 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,