[Mplayer-cvslog] CVS: main/libvo vo_dxr3.c,1.30,1.31

Arpi of Ize arpi at mplayer.dev.hu
Tue Jan 15 01:22:58 CET 2002


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

Modified Files:
	vo_dxr3.c 
Log Message:
hw spu support for dxr3 - patch by David Holm

Index: vo_dxr3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dxr3.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- vo_dxr3.c	12 Jan 2002 15:59:47 -0000	1.30
+++ vo_dxr3.c	15 Jan 2002 00:22:56 -0000	1.31
@@ -91,6 +91,8 @@
 }
 #endif
 
+extern int vidmode;
+
 static uint32_t init(uint32_t scr_width, uint32_t scr_height, uint32_t width, uint32_t height, uint32_t fullscreen, char *title, uint32_t format)
 {
 	int tmp1,tmp2;
@@ -112,7 +114,7 @@
 		sprintf(devname, "/dev/em8300_mv-%s", vo_subdevice);
 	else
 		sprintf(devname, "/dev/em8300_mv");
-	fd_video = open(devname, O_WRONLY);
+	fd_video = open(devname, O_WRONLY | O_NONBLOCK);
 	if (fd_video < 0) {
 		printf("VO: [dxr3] Error opening %s for writing!\n", devname);
 		uninit();
@@ -135,7 +137,7 @@
 	/* Subpic code isn't working yet, don't set to ON 
 	 * unless you are really sure what you are doing 
 	 */
-	ioval = EM8300_SPUMODE_OFF;
+	ioval = EM8300_SPUMODE_ON;
 	if (ioctl(fd_control, EM8300_IOCTL_SET_SPUMODE, &ioval) < 0) {
 		printf("VO: [dxr3] Unable to set subpicture mode!\n");
 		uninit();
@@ -332,11 +334,19 @@
 		vo_mpegpes_t *p = (vo_mpegpes_t *) src[0];
 		size_t data_left = p->size;
 
-		if (ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts) < 0)
-			printf("VO: [dxr3] Unable to set pts\n");
+		if (p->id == 0x20) {
+			if (ioctl(fd_spu, EM8300_IOCTL_SPU_SETPTS, &vo_pts) < 0)
+				printf("VO: [dxr3] Unable to set pts\n");
+
+			while (data_left)
+				data_left -= write(fd_spu, (void*) (p->data + p->size-data_left), data_left);
+		} else {
+			if (ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts) < 0)
+				printf("VO: [dxr3] Unable to set pts\n");
 		
-		while (data_left)
-			data_left -= write(fd_video, (void*) (p->data + p->size-data_left), data_left);
+			while (data_left)
+				data_left -= write(fd_video, (void*) (p->data + p->size-data_left), data_left);
+		}
 		return 0;
 	}
 #ifdef USE_MP1E
@@ -439,7 +449,7 @@
 	uint32_t flag = 0;
 	
 	if (format == IMGFMT_MPEGPES)
-		flag = 0x2 | 0x4;
+		flag = 0x2 | 0x4 | 0x8;
 #ifdef USE_MP1E
 	if (format == IMGFMT_YV12)
 		flag = 0x1 | 0x4;




More information about the MPlayer-cvslog mailing list