Now with patch :-)

                Hans

On Tuesday 09 August 2005 19:56, Hans Verkuil wrote:
> (Sourceforge seems to have eaten this mail, so I'm mailing it again)
>
> This patch fixes alevt & nxtvepg support: alevt expects a sequence number
> at the end of the raw VBI data. This was commented out by someone and has
> been reinstated at the proper place.
>
> Also, the alevt patch now also fixes an alignment problem for 64-bit
> systems.
>
> Regards,
>
>               Hans
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> ivtv-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel
diff -ru ivtv-0.3.7b/driver/ivtv-irq.c ivtv/driver/ivtv-irq.c
--- ivtv-0.3.7b/driver/ivtv-irq.c	2005-08-02 15:01:54.000000000 +0200
+++ ivtv/driver/ivtv-irq.c	2005-08-09 00:39:36.000000000 +0200
@@ -274,25 +274,6 @@
 			/* Parse and Groom VBI Data */
 			ivtv_process_vbi_data(itv,
 				buf, stream->pts, stream->type);
-#if 0
-			/* Skip startcode/timestamp */
-			if (freed == 0 && 
-				itv->vbi_service_set_in == 0 && 
-				stmtype == IVTV_ENC_STREAM_TYPE_VBI)
-			{
-                        	u8 *p = (u8 *) buf->buffer.m.userptr;
-
-                		/* Dirty hack needed for backwards 
-					compatibility of old VBI software. */
-                        	//memcpy(p, &itv->vbi_frame, 4);
-
-				/* Offset by startcode, makes each frame end 
-				   with timestamp */
-				/*if (itv->vbi_frame == 1)
-					buf->buffer.bytesused -= 4;*/
-			}
-#endif
-
 		}
 
                 if (test_bit(IVTV_F_S_NO_READ, &stream->s_flags) || 
diff -ru ivtv-0.3.7b/driver/ivtv-vbi.c ivtv/driver/ivtv-vbi.c
--- ivtv-0.3.7b/driver/ivtv-vbi.c	2005-06-23 14:49:33.000000000 +0200
+++ ivtv/driver/ivtv-vbi.c	2005-08-09 00:41:02.000000000 +0200
@@ -690,6 +690,11 @@
 	    itv->vbi_service_set_in == 0) 
 	{
 		set_bit(IVTV_F_B_NEED_BUF_SWAP, &buf->b_flags);	
+                /* Dirty hack needed for backwards 
+		   compatibility of old VBI software. */
+                p += size - 4;
+                memcpy(p, &itv->vbi_frame, 4);
+                swab32s((u32 *)p);
 		return;
 	} else if (streamtype == IVTV_ENC_STREAM_TYPE_VBI &&
 		   itv->vbi_insert_mpeg == 1) {
diff -ru ivtv-0.3.7b/patches/alevt.diff ivtv/patches/alevt.diff
--- ivtv-0.3.7b/patches/alevt.diff	2004-10-18 04:02:32.000000000 +0200
+++ ivtv/patches/alevt.diff	2005-08-09 00:37:38.000000000 +0200
@@ -1,7 +1,17 @@
 diff -ru alevt-1.6.1/vbi.c alevt/vbi.c
 --- alevt-1.6.1/vbi.c	2001-03-03 19:14:03.000000000 +0100
-+++ alevt/vbi.c	2004-06-27 13:10:15.209001868 +0200
-@@ -49,7 +49,7 @@
++++ alevt/vbi.c	2005-08-09 00:32:22.000000000 +0200
+@@ -41,15 +41,17 @@
+ struct v4l2_format
+ {
+     u32	type;			/* V4L2_BUF_TYPE_* */
++
+     union
+     {
++        double dummy_to_force_correct_64_bit_alignment;
+ 	struct v4l2_vbi_format vbi;	/*  VBI data  */
+ 	u8 raw_data[200];		/* user-defined */
+     } fmt;
  };
  
  #define V4L2_VBI_SF_UBYTE	1
@@ -10,7 +20,7 @@
  #define VIDIOC_G_FMT		_IOWR('V',  4, struct v4l2_format)
  
  /***** end of api definitions *****/
-@@ -468,7 +468,7 @@
+@@ -468,7 +470,7 @@
      int soc, eoc;	// start/end of clock run-in
      int bpl;		// bytes per line
  
@@ -19,7 +29,7 @@
      {
  	error("v4l2: unsupported vbi data format");
  	return -1;
-@@ -526,8 +526,9 @@
+@@ -526,8 +528,9 @@
      struct v4l2_format v4l2_format[1];
      struct v4l2_vbi_format *vbifmt = &v4l2_format->fmt.vbi;
  

Reply via email to