Mercurial > mplayer.hg
comparison mplayer.c @ 1420:d97816161256
removed obsolote frame_corr_* stuff
author | arpi |
---|---|
date | Sun, 29 Jul 2001 17:42:06 +0000 |
parents | eda16e490ae7 |
children | ea0a0b9e6fbc |
comparison
equal
deleted
inserted
replaced
1419:4f2bcaaff638 | 1420:d97816161256 |
---|---|
942 fflush(stdout); | 942 fflush(stdout); |
943 | 943 |
944 //================== MAIN: ========================== | 944 //================== MAIN: ========================== |
945 { | 945 { |
946 | 946 |
947 float frame_correction=0; // average of A-V timestamp differences | 947 //float frame_correction=0; // average of A-V timestamp differences |
948 int frame_corr_num=0; // | 948 //int frame_corr_num=0; // |
949 //float v_frame=0; // Video | 949 //float v_frame=0; // Video |
950 float time_frame=0; // Timer | 950 float time_frame=0; // Timer |
951 int eof=0; | 951 int eof=0; |
952 int force_redraw=0; | 952 int force_redraw=0; |
953 //float num_frames=0; // number of frames played | 953 //float num_frames=0; // number of frames played |
1344 v_pts=d_video->pts-frame_time; | 1344 v_pts=d_video->pts-frame_time; |
1345 } | 1345 } |
1346 | 1346 |
1347 if(verbose>1)printf("### A:%8.3f (%8.3f) V:%8.3f A-V:%7.4f \n",a_pts,a_pts-audio_delay-delay,v_pts,(a_pts-delay-audio_delay)-v_pts); | 1347 if(verbose>1)printf("### A:%8.3f (%8.3f) V:%8.3f A-V:%7.4f \n",a_pts,a_pts-audio_delay-delay,v_pts,(a_pts-delay-audio_delay)-v_pts); |
1348 | 1348 |
1349 if(frame_corr_num==1){ | |
1350 float x=frame_correction; | |
1351 if(delay_corrected){ | 1349 if(delay_corrected){ |
1350 float x=(a_pts-delay-audio_delay)-v_pts; | |
1352 // printf("A:%6.1f V:%6.1f A-V:%7.3f",a_pts-audio_delay-delay,v_pts,x); | 1351 // printf("A:%6.1f V:%6.1f A-V:%7.3f",a_pts-audio_delay-delay,v_pts,x); |
1353 printf("A:%6.1f (%6.1f) V:%6.1f A-V:%7.3f",a_pts,a_pts-audio_delay-delay,v_pts,x); | 1352 printf("A:%6.1f (%6.1f) V:%6.1f A-V:%7.3f",a_pts,a_pts-audio_delay-delay,v_pts,x); |
1354 x*=0.1f; | 1353 x*=0.1f; |
1355 if(x<-max_pts_correction) x=-max_pts_correction; else | 1354 if(x<-max_pts_correction) x=-max_pts_correction; else |
1356 if(x> max_pts_correction) x= max_pts_correction; | 1355 if(x> max_pts_correction) x= max_pts_correction; |
1366 (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0 | 1365 (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0 |
1367 ,drop_frame_cnt | 1366 ,drop_frame_cnt |
1368 ); | 1367 ); |
1369 fflush(stdout); | 1368 fflush(stdout); |
1370 } | 1369 } |
1371 frame_corr_num=0; frame_correction=0; | |
1372 } | |
1373 | |
1374 if(frame_corr_num>=0) frame_correction+=(a_pts-delay-audio_delay)-v_pts; | |
1375 | 1370 |
1376 } else { | 1371 } else { |
1377 // No audio: | 1372 // No audio: |
1378 //if(d_video->pts) | 1373 |
1379 float v_pts=d_video->pts; | 1374 printf("V:%6.1f %3d %2d%% %2d%% %3.1f%% \r",d_video->pts, |
1380 if(frame_corr_num==5){ | |
1381 // printf("A: --- V:%6.1f \r",v_pts); | |
1382 printf("V:%6.1f %3d %2d%% %2d%% %3.1f%% \r",v_pts, | |
1383 (int)sh_video->num_frames, | 1375 (int)sh_video->num_frames, |
1384 (sh_video->timer>0.5)?(int)(100.0*video_time_usage/(double)sh_video->timer):0, | 1376 (sh_video->timer>0.5)?(int)(100.0*video_time_usage/(double)sh_video->timer):0, |
1385 (sh_video->timer>0.5)?(int)(100.0*vout_time_usage/(double)sh_video->timer):0, | 1377 (sh_video->timer>0.5)?(int)(100.0*vout_time_usage/(double)sh_video->timer):0, |
1386 (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0 | 1378 (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0 |
1387 ); | 1379 ); |
1388 | 1380 |
1389 fflush(stdout); | 1381 fflush(stdout); |
1390 frame_corr_num=0; | 1382 |
1391 } | 1383 } |
1392 } | |
1393 ++frame_corr_num; | |
1394 #endif | 1384 #endif |
1395 | 1385 |
1396 if(osd_visible){ | 1386 if(osd_visible){ |
1397 --osd_visible; | 1387 --osd_visible; |
1398 if(!osd_visible) vo_osd_progbar_type=-1; // disable | 1388 if(!osd_visible) vo_osd_progbar_type=-1; // disable |
1544 vo_osd_progbar_type=0; | 1534 vo_osd_progbar_type=0; |
1545 vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len; | 1535 vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len; |
1546 } | 1536 } |
1547 } | 1537 } |
1548 | 1538 |
1549 c_total=0; // kell ez? | 1539 c_total=0; |
1550 max_pts_correction=0.1; | 1540 max_pts_correction=0.1; |
1551 frame_corr_num=0; // -5 FIXME!!! | |
1552 frame_correction=0; | |
1553 force_redraw=5; | 1541 force_redraw=5; |
1554 audio_time_usage=0; video_time_usage=0; vout_time_usage=0; | 1542 audio_time_usage=0; video_time_usage=0; vout_time_usage=0; |
1555 | 1543 |
1556 } | 1544 } |
1557 rel_seek_secs=0; | 1545 rel_seek_secs=0; |