teerytko / python-video4linux2

Automatically exported from code.google.com/p/python-video4linux2
0 stars 0 forks source link

lib.StreamOn and lib.StreamOff called with too few arguments #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This In function StreamOn:
pyv4l2.py:633: if lib.StreamOn(self.fd) == -1:

In function StreamOff:
pyv4l2.py:642: if lib.StreamOff(self.fd) == -1:

pyv4lconnector.c:140: int StreamOn(int fd, int type)

pyv4lconnector.c:146: int StreamOn(int fd, int type)

----

Solution: Remove argument 'type'.

int StreamOn(int fd)
{
  int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
  return ioctl(fd, VIDIOC_STREAMON, &type);
}

int StreamOff(int fd)
{
  int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
  return ioctl(fd, VIDIOC_STREAMOFF, &type);
}

Original issue reported on code.google.com by shreddu@gmail.com on 27 Feb 2009 at 10:04