diff mplayer.c @ 1400:2bf9c561b01d

stage2 step 1
author arpi
date Sat, 28 Jul 2001 20:33:51 +0000
parents 9e8781a3eefc
children c11f2a77ff70
line wrap: on
line diff
--- a/mplayer.c	Sat Jul 28 13:18:00 2001 +0000
+++ b/mplayer.c	Sat Jul 28 20:33:51 2001 +0000
@@ -190,6 +190,8 @@
 static vo_functions_t *video_out=NULL;
 static ao_functions_t *audio_out=NULL;
 
+float c_total=0;
+
 double video_time_usage=0;
 double vout_time_usage=0;
 static double audio_time_usage=0;
@@ -244,6 +246,7 @@
 int force_ni=0;
 
 float default_max_pts_correction=-1;//0.01f;
+float max_pts_correction=0;//default_max_pts_correction;
 #ifdef AVI_SYNC_BPS
 int pts_from_bps=1;
 #else
@@ -277,6 +280,7 @@
 /*DSP!!char *dsp=NULL;*/
 
 float rel_seek_secs=0;
+float initial_pts_delay=0;
 
 extern char *vo_subdevice;
 extern char *ao_subdevice;
@@ -330,7 +334,7 @@
   exit(1);
 }
 
-static char* current_module=NULL; // for debugging
+char* current_module=NULL; // for debugging
 
 void exit_sighandler(int x){
   static int sig_count=0;
@@ -417,7 +421,6 @@
 int file_format=DEMUXER_TYPE_UNKNOWN;
 //
 int delay_corrected=1;
-float initial_pts_delay=0;
 #ifdef VCD_CACHE
 int vcd_cache_size=128;
 #endif
@@ -946,11 +949,9 @@
 int frame_corr_num=0;   //
 //float v_frame=0;    // Video
 float time_frame=0; // Timer
-float c_total=0;
-float max_pts_correction=0;//default_max_pts_correction;
 int eof=0;
 int force_redraw=0;
-float num_frames=0;      // number of frames played
+//float num_frames=0;      // number of frames played
 int grab_frames=0;
 char osd_text_buffer[64];
 int drop_frame=0;
@@ -1220,7 +1221,7 @@
 //------------------------ frame decoded. --------------------
 
     // Increase video timers:
-    num_frames+=frame_time;
+    sh_video->num_frames+=frame_time;
     frame_time*=sh_video->frametime;
     if(file_format==DEMUXER_TYPE_ASF && !force_fps){
         // .ASF files has no fixed FPS - just frame durations!
@@ -1360,7 +1361,7 @@
           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\r",c_total,
-        (int)num_frames,
+        (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,
         (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0
@@ -1380,7 +1381,7 @@
     if(frame_corr_num==5){
 //      printf("A: ---   V:%6.1f   \r",v_pts);
       printf("V:%6.1f  %3d  %2d%%  %2d%%  %3.1f%% \r",v_pts,
-        (int)num_frames,
+        (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,
         (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0
@@ -1581,7 +1582,7 @@
           int id=((AVIINDEXENTRY *)demuxer->idx)[i].ckid;
           if(avi_stream_id(id)==d_video->id) ++d_video->pack_no;
       }
-      num_frames=d_video->pack_no;
+      sh_video->num_frames=d_video->pack_no;
       avi_video_pts=d_video->pack_no*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
 
       if(sh_audio){