summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-27 18:29:33 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-27 18:29:33 +0000
commitfc476c1b708e79b10b8ddd6b42351e129e5ab541 (patch)
treee500bbe9f7dfcf9cd976e526746987cfa151871c /mencoder.c
parent2d0f99c51023d140651ced92955cf193e3225b88 (diff)
downloadmpv-fc476c1b708e79b10b8ddd6b42351e129e5ab541.tar.bz2
mpv-fc476c1b708e79b10b8ddd6b42351e129e5ab541.tar.xz
ETA/Esize/fps and some more... - new statusline
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4388 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/mencoder.c b/mencoder.c
index ed29074f0a..3a95dda64a 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -344,6 +344,8 @@ char* frameno_filename="frameno.avi";
int decoded_frameno=0;
int next_frameno=-1;
+unsigned int timer_start;
+
//int out_buffer_size=0x200000;
//unsigned char* out_buffer=malloc(out_buffer_size);
@@ -1105,6 +1107,8 @@ signal(SIGINT,exit_sighandler); // Interrupt from keyboard
signal(SIGQUIT,exit_sighandler); // Quit from keyboard
signal(SIGTERM,exit_sighandler); // kill
+timer_start=GetTimerMS();
+
while(!eof){
float frame_time=0;
@@ -1388,15 +1392,13 @@ if(sh_audio && !demuxer2){
// sh_video->timer-=x;
c_total+=x;
v_pts_corr+=x;
-
- printf("A:%6.1f V:%6.1f A-V:%7.3f oAV:%7.3f diff:%7.3f ct:%7.3f vpc:%7.3f \r",
- a_pts,v_pts,a_pts-v_pts,
- (float)(mux_a->timer-mux_v->timer),
- AV_delay, c_total, v_pts_corr );
-
}
-else
- printf("V:%6.1f \r", d_video->pts );
+
+// printf("A:%6.1f V:%6.1f A-V:%7.3f oAV:%7.3f diff:%7.3f ct:%7.3f vpc:%7.3f \r",
+// a_pts,v_pts,a_pts-v_pts,
+// (float)(mux_a->timer-mux_v->timer),
+// AV_delay, c_total, v_pts_corr );
+// printf("V:%6.1f \r", d_video->pts );
#if 0
mp_msg(MSGT_AVSYNC,MSGL_STATUS,"A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f %3d/%3d %2d%% %2d%% %4.1f%% %d%%\r",
@@ -1409,6 +1411,18 @@ else
);
#endif
+ { float t=(GetTimerMS()-timer_start)*0.001f;
+ float len=(demuxer->movi_end-demuxer->movi_start);
+ float p=len>1000 ? (float)(demuxer->filepos-demuxer->movi_start) / len : 0;
+ mp_msg(MSGT_AVSYNC,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps ETA:%4dmin/%3dmb A-V:%5.3f \r",
+ mux_v->timer, decoded_frameno, (int)(p*100),
+ (t>1) ? (int)(decoded_frameno/t) : 0,
+ (p>0.001) ? (int)(t/p/60) : 0,
+ (p>0.001) ? (int)(ftell(muxer_f)/p/1024/1024) : 0,
+ v_pts_corr
+ );
+ }
+
fflush(stdout);