[Mplayer-cvslog] CVS: main cfg-mplayer.h,1.164,1.165 mplayer.c,1.572,1.573

Arpi of Ize arpi at mplayerhq.hu
Tue Sep 24 00:12:33 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv27903

Modified Files:
	cfg-mplayer.h mplayer.c 
Log Message:
removed -dapsync (obsolete code)


Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- cfg-mplayer.h	21 Sep 2002 17:23:46 -0000	1.164
+++ cfg-mplayer.h	23 Sep 2002 22:12:29 -0000	1.165
@@ -346,8 +346,9 @@
 	{"playlist", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL},
 
 	// a-v sync stuff:
-	{"dapsync", &dapsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nodapsync", &dapsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+//	{"dapsync", &dapsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+//	{"nodapsync", &dapsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+
 	{"softsleep", &softsleep, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #ifdef HAVE_RTC
 	{"nortc", &nortc, CONF_TYPE_FLAG, 0, 0, 1, NULL},

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.572
retrieving revision 1.573
diff -u -r1.572 -r1.573
--- mplayer.c	23 Sep 2002 22:05:09 -0000	1.572
+++ mplayer.c	23 Sep 2002 22:12:29 -0000	1.573
@@ -209,7 +209,6 @@
 static float c_total=0;
        float audio_delay=0;
 
-static int dapsync=0;
 static int softsleep=0;
 
 static float force_fps=0;
@@ -1610,53 +1609,10 @@
 	  float delay=audio_out->get_delay();
 	  mp_dbg(MSGT_AVSYNC,MSGL_DBG2,"delay=%f\n",delay);
 
-	if(!dapsync){
-
-	      /* Arpi's AV-sync */
-
           time_frame=sh_video->timer;
           time_frame-=sh_audio->timer-delay;
 
-	} else {  // if(!dapsync)
-
-	      /* DaP's AV-sync */
-
-    	      float SH_AV_delay;
-	      /* SH_AV_delay = sh_video->timer - (sh_audio->timer - (float)((float)delay + sh_audio->a_buffer_len) / (float)sh_audio->o_bps); */
-	      SH_AV_delay = sh_video->timer - (sh_audio->timer - (float)((float)delay) / (float)sh_audio->o_bps);
-	      // printf ("audio slp req: %.3f TF: %.3f delta: %.3f (v: %.3f a: %.3f) | ", i, time_frame,
-	      //	    i - time_frame, sh_video->timer, sh_audio->timer - (float)((float)delay / (float)sh_audio->o_bps));
-	      if(SH_AV_delay<-2*frame_time){
-	          drop_frame=frame_dropping; // tricky!
-	          ++drop_frame_cnt;
-		mp_msg(MSGT_AVSYNC,MSGL_INFO,"A-V SYNC: FRAMEDROP (SH_AV_delay=%.3f)!\n", SH_AV_delay);
-	        mp_msg(MSGT_AVSYNC,MSGL_DBG2,"\nframe drop %d, %.2f\n", drop_frame, time_frame);
-	        /* go into unlimited-TF cycle */
-    		time_frame = SH_AV_delay;
-	      } else {
-#define	SL_CORR_AVG_LEN	125
-	        /* don't adjust under framedropping */
-	        time_frame_corr_avg = (time_frame_corr_avg * (SL_CORR_AVG_LEN - 1) +
-	    				(SH_AV_delay - time_frame)) / SL_CORR_AVG_LEN;
-#define	UNEXP_CORR_MAX	0.1	/* limit of unexpected correction between two frames (percentage) */
-#define	UNEXP_CORR_WARN	1.0	/* warn limit of A-V lag (percentage) */
-	        time_frame += time_frame_corr_avg;
-	        // printf ("{%.3f - %.3f}\n", i - time_frame, frame_time + frame_time_corr_avg);
-	        if (SH_AV_delay - time_frame < (frame_time + time_frame_corr_avg) * UNEXP_CORR_MAX &&
-		    SH_AV_delay - time_frame > (frame_time + time_frame_corr_avg) * -UNEXP_CORR_MAX)
-		    time_frame = SH_AV_delay;
-	        else {
-		    if (SH_AV_delay - time_frame > (frame_time + time_frame_corr_avg) * UNEXP_CORR_WARN ||
-		        SH_AV_delay - time_frame < (frame_time + time_frame_corr_avg) * -UNEXP_CORR_WARN)
-		        mp_msg(MSGT_AVSYNC, MSGL_WARN, "WARNING: A-V SYNC LAG TOO LARGE: %.3f {%.3f - %.3f} (too little UNEXP_CORR_MAX?)\n",
-		  	    SH_AV_delay - time_frame, SH_AV_delay, time_frame);
-		        time_frame += (frame_time + time_frame_corr_avg) * ((SH_AV_delay > time_frame) ?
-		    		      UNEXP_CORR_MAX : -UNEXP_CORR_MAX);
-	        }
-	      }	/* /start dropframe */
-
-	} // if(dapsync)
-
+	// delay = amount of audio buffered in soundcard/driver
 	if(delay>0.25) delay=0.25; else
 	if(delay<0.10) delay=0.10;
 	if(time_frame>delay*0.6){




More information about the MPlayer-cvslog mailing list