1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
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 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
-#define V4L2_BUF_TYPE_VBI 0x00000009
+#define V4L2_BUF_TYPE_VBI_CAPTURE 0x00000004
#define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format)
/***** end of api definitions *****/
@@ -468,7 +470,7 @@
int soc, eoc; // start/end of clock run-in
int bpl; // bytes per line
- if (p->sample_format != V4L2_VBI_SF_UBYTE)
+ if (0 && p->sample_format != V4L2_VBI_SF_UBYTE)
{
error("v4l2: unsupported vbi data format");
return -1;
@@ -526,8 +528,9 @@
struct v4l2_format v4l2_format[1];
struct v4l2_vbi_format *vbifmt = &v4l2_format->fmt.vbi;
+ v4l2_format[0].type = V4L2_BUF_TYPE_VBI_CAPTURE;
if (ioctl(vbi->fd, VIDIOC_G_FMT, v4l2_format) == -1
- || v4l2_format->type != V4L2_BUF_TYPE_VBI)
+ || v4l2_format->type != V4L2_BUF_TYPE_VBI_CAPTURE)
{
// not a v4l2 device. assume bttv and create a standard fmt-struct.
int size;
|