[Mplayer-cvslog] CVS: main/libvo vo_dxr3.c,1.52,1.53

David Holm mswitch at mplayer.dev.hu
Sat Feb 9 18:40:36 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv3688/libvo

Modified Files:
	vo_dxr3.c 
Log Message:
updated :noprebuf to emulate the playback used in mplayer 0.60 (with dxr3 patch), this solves 
alot of issues for ppl who had problems with the new prebuffering code


Index: vo_dxr3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dxr3.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- vo_dxr3.c	9 Feb 2002 14:44:09 -0000	1.52
+++ vo_dxr3.c	9 Feb 2002 17:40:33 -0000	1.53
@@ -171,10 +171,12 @@
 	ioval = EM8300_SUBDEVICE_AUDIO;
 	ioctl(fd_control, EM8300_IOCTL_FLUSH, &ioval);
 	fsync(fd_video);
-	ioval = 0x900;
-	ioctl(fd_control, EM8300_IOCTL_SCR_SETSPEED, &ioval);
-	ioval = 0;
-	ioctl(fd_control, EM8300_IOCTL_SCR_SET, &ioval);
+	if (!noprebuf) {
+		ioval = 0x900;
+		ioctl(fd_control, EM8300_IOCTL_SCR_SETSPEED, &ioval);
+		ioval = 0;
+		ioctl(fd_control, EM8300_IOCTL_SCR_SET, &ioval);
+	}
 
 	/* Store some variables statically that we need later in another scope */
 	img_format = format;
@@ -299,12 +301,16 @@
 
 static uint32_t draw_frame(uint8_t * src[])
 {
-	ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts);
+	if (!noprebuf) {
+		ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts);
+	}
 	if (img_format == IMGFMT_MPEGPES) {
 		vo_mpegpes_t *p = (vo_mpegpes_t *) src[0];
 		
 		if (p->id == 0x20) {
-			ioctl(fd_spu, EM8300_IOCTL_SPU_SETPTS, &vo_pts);
+			if (!noprebuf) {
+				ioctl(fd_spu, EM8300_IOCTL_SPU_SETPTS, &vo_pts);
+			}
 			write(fd_spu, p->data, p->size);
 		} else {
 			write(fd_video, p->data, p->size);
@@ -334,7 +340,9 @@
 #ifdef USE_LIBAVCODEC
 	if (img_format == IMGFMT_YV12) {
 		int out_size = avcodec_encode_video(avc_context, avc_outbuf, avc_outbuf_size, &avc_picture);
-		ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts);
+		if (!noprebuf) {
+			ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts);
+		}
 		write(fd_video, avc_outbuf, out_size);
 	}
 #endif




More information about the MPlayer-cvslog mailing list