mirror of
https://github.com/mpv-player/mpv
synced 2025-01-20 21:07:29 +01:00
-quiet option patch by Adam Tla/lka atlka@pg.gda.pl
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1449 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
de316dee37
commit
1ef51739de
@ -196,6 +196,7 @@ struct config conf[]={
|
||||
{"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},
|
||||
|
@ -86,6 +86,7 @@ static URL_t* url;
|
||||
int nogui=1;
|
||||
#endif
|
||||
int verbose=0;
|
||||
int quiet=0;
|
||||
|
||||
#define ABS(x) (((x)>=0)?(x):(-(x)))
|
||||
|
||||
@ -1146,7 +1147,7 @@ if(file_format==DEMUXER_TYPE_AVI && sh_audio){
|
||||
// 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(1)
|
||||
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 @@ if(1)
|
||||
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 @@ if(1)
|
||||
} 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,
|
||||
|
Loading…
Reference in New Issue
Block a user