[Mplayer-cvslog] CVS: main/libvo vo_zr.c,1.10,1.11

Rik Snel CVS rik at mplayer.dev.hu
Tue Feb 12 16:53:43 CET 2002


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

Modified Files:
	vo_zr.c 
Log Message:
migration of -vo zr to Recommended Interface definition (this obsoletes zoran.h)

Index: vo_zr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_zr.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vo_zr.c	11 Feb 2002 01:24:56 -0000	1.10
+++ vo_zr.c	12 Feb 2002 15:53:40 -0000	1.11
@@ -15,7 +15,7 @@
 #include <sys/ioctl.h>
 #include <linux/types.h>
 #include <linux/videodev.h>
-#include "zoran.h"
+#include "videodev_mjpeg.h"
 
 #include "config.h"
 
@@ -71,9 +71,9 @@
 
 int vdes;  /* the file descriptor of the video device */
 int frame = 0, synco = 0, queue = 0; /* buffer management */
-struct zoran_params zp;
-struct zoran_requestbuffers zrq;
-struct zoran_sync zs;
+struct mjpeg_params zp;
+struct mjpeg_requestbuffers zrq;
+struct mjpeg_sync zs;
 struct video_capability vc;
 #define MJPEG_NBUFFERS	2
 #define MJPEG_SIZE	1024*256
@@ -91,7 +91,7 @@
 	/* before we can ask for the maximum resolution, we must set 
 	 * the correct tv norm */
 
-	if (ioctl(vdes, BUZIOC_G_PARAMS, &zp) < 0) {
+	if (ioctl(vdes, MJPIOC_G_PARAMS, &zp) < 0) {
 		mp_msg(MSGT_VO, MSGL_ERR, "device at %s is probably not a DC10(+)/buz/lml33\n", dev);
 		return 1;
 	}
@@ -99,12 +99,12 @@
 	if (zp.norm != norm && norm != VIDEO_MODE_AUTO) {
 		/* attempt to set requested norm */
 		zp.norm = norm;
-		if (ioctl(vdes, BUZIOC_S_PARAMS, &zp) < 0) {
+		if (ioctl(vdes, MJPIOC_S_PARAMS, &zp) < 0) {
 			mp_msg(MSGT_VO, MSGL_ERR,
 				"unable to change video norm, use another program to change it (XawTV)\n");
 			return 1;
 		}
-		ioctl(vdes, BUZIOC_G_PARAMS, &zp);
+		ioctl(vdes, MJPIOC_G_PARAMS, &zp);
 		if (norm != zp.norm) {
 			mp_msg(MSGT_VO, MSGL_ERR,
 				"unable to change video norm, use another program to change it (XawTV)\n");
@@ -152,7 +152,7 @@
 	zp.img_height = zp.VerDcm*image_height/fields;
 	mp_msg(MSGT_VO, MSGL_V, "zr: geometry (after 'scaling'): %dx%d+%d+%d fields=%d, w=%d, h=%d\n", zp.img_width, (3-fields)*zp.img_height, zp.img_x, zp.img_y, fields, image_width/hdec, image_height);
 
-	if (ioctl(vdes, BUZIOC_S_PARAMS, &zp) < 0) {
+	if (ioctl(vdes, MJPIOC_S_PARAMS, &zp) < 0) {
 		mp_msg(MSGT_VO, MSGL_ERR, "error setting display parameters\n");
 		return 1;
 	}
@@ -160,7 +160,7 @@
 	zrq.count = MJPEG_NBUFFERS;
 	zrq.size = MJPEG_SIZE;
 
-	if (ioctl(vdes, BUZIOC_REQBUFS, &zrq)) {
+	if (ioctl(vdes, MJPIOC_REQBUFS, &zrq)) {
 		mp_msg(MSGT_VO, MSGL_ERR, "error requesting %d buffers of size %d\n", zrq.count, zrq.size);
 		return 1;
 	}
@@ -181,13 +181,13 @@
 		image=NULL;
 	}
 	while (queue > synco + 1) {
-		if (ioctl(vdes, BUZIOC_SYNC, &zs) < 0) 
+		if (ioctl(vdes, MJPIOC_SYNC, &zs) < 0) 
 			mp_msg(MSGT_VO, MSGL_ERR, "error waiting for buffers to become free"); 
 		synco++;
 	}
 	/* stop streaming */
 	frame = -1;
-	if (ioctl(vdes, BUZIOC_QBUF_PLAY, &frame) < 0) 
+	if (ioctl(vdes, MJPIOC_QBUF_PLAY, &frame) < 0) 
 		mp_msg(MSGT_VO, MSGL_ERR, "error stopping playback of last frame");
 	close(vdes);
 }
@@ -406,7 +406,7 @@
 	if (queue-synco < zrq.count) {
 		frame = queue;
 	} else {
-		if (ioctl(vdes, BUZIOC_SYNC, &zs) < 0) 
+		if (ioctl(vdes, MJPIOC_SYNC, &zs) < 0) 
 			mp_msg(MSGT_VO, MSGL_ERR, "error waiting for buffers to become free"); 
 		frame = zs.frame;
 		synco++;
@@ -428,7 +428,7 @@
 	fread(buf+frame*zrq.size, 1, 2126, fp);
 	fclose(fp);*/
 	
-	if (ioctl(vdes, BUZIOC_QBUF_PLAY, &frame) < 0) 
+	if (ioctl(vdes, MJPIOC_QBUF_PLAY, &frame) < 0) 
 		mp_msg(MSGT_VO, MSGL_ERR,
 				"error queueing buffer for playback");
 	queue++;




More information about the MPlayer-cvslog mailing list