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
|
--- xawtv-3.95/libng/plugins/drv0-v4l2.c 2005-02-11 18:56:24.000000000 +0100
+++ xawtv-3.95.new/libng/plugins/drv0-v4l2.c 2008-07-05 21:12:37.000000000 +0200
@@ -161,7 +161,7 @@
#define PREFIX "ioctl: "
static int
-xioctl(int fd, int cmd, void *arg, int mayfail)
+xioctl(int fd, unsigned long int cmd, void *arg, int mayfail)
{
int rc;
@@ -768,6 +768,7 @@
/* get it */
memset(&buf,0,sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
if (-1 == xioctl(h->fd,VIDIOC_DQBUF,&buf, 0))
return -1;
h->waiton++;
@@ -813,8 +814,7 @@
if (-1 == xioctl(h->fd, VIDIOC_QUERYBUF, &h->buf_v4l2[i], 0))
return -1;
h->buf_me[i].fmt = h->fmt_me;
- h->buf_me[i].size = h->buf_me[i].fmt.bytesperline *
- h->buf_me[i].fmt.height;
+ h->buf_me[i].size = h->buf_v4l2[i].length;
h->buf_me[i].data = mmap(NULL, h->buf_v4l2[i].length,
PROT_READ | PROT_WRITE, MAP_SHARED,
h->fd, h->buf_v4l2[i].m.offset);
|