diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-16 01:03:51 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-16 01:03:51 +0000 |
commit | 40f28a4215e8b45c67cce076da4cd4118c0edd89 (patch) | |
tree | 4b41cffc338965768bfd76390109637ccbda74b2 | |
parent | bda27f2adc68d6065d7a7df1e6558c062efe41f1 (diff) |
display number of decoded frames (for progr. mpeg2)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1547 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | demux_avi.c | 2 | ||||
-rw-r--r-- | mplayer.c | 5 | ||||
-rw-r--r-- | stheader.h | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/demux_avi.c b/demux_avi.c index 7228b7c160..0ccd4c444f 100644 --- a/demux_avi.c +++ b/demux_avi.c @@ -519,7 +519,7 @@ void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){ int id=((AVIINDEXENTRY *)priv->idx)[i].ckid; if(avi_stream_id(id)==d_video->id) ++d_video->pack_no; } - sh_video->num_frames=d_video->pack_no; + sh_video->num_frames=sh_video->num_frames_decoded=d_video->pack_no; priv->avi_video_pts=d_video->pack_no*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate; d_video->pos=video_chunk_pos; @@ -1223,6 +1223,7 @@ if(1) // Increase video timers: sh_video->num_frames+=frame_time; + ++sh_video->num_frames_decoded; frame_time*=sh_video->frametime; if(file_format==DEMUXER_TYPE_ASF && !force_fps){ // .ASF files has no fixed FPS - just frame durations! @@ -1377,9 +1378,9 @@ if(1) else max_pts_correction=sh_video->frametime*0.10; // +-10% of time sh_audio->timer+=x; c_total+=x; - if(!quiet) printf("A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f %3d %2d%% %2d%% %4.1f%% %d %d\r", + if(!quiet) printf("A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f %3d/%3d %2d%% %2d%% %4.1f%% %d %d\r", a_pts-audio_delay-delay,v_pts,AV_delay,c_total, - (int)sh_video->num_frames, + (int)sh_video->num_frames,(int)sh_video->num_frames_decoded, (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, (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0 diff --git a/stheader.h b/stheader.h index 367151aa65..daf55ca727 100644 --- a/stheader.h +++ b/stheader.h @@ -56,6 +56,7 @@ typedef struct { // unsigned int bitrate; // buffers: float num_frames; // number of frames played + int num_frames_decoded; // number of frames decoded char *our_out_buffer; // win32 codec stuff: AVIStreamHeader video; |