[Sumover-dev] [svn commit] r4061 - vic/branches/mpeg4/video
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Fri Jun 8 16:28:08 BST 2007
Author: piers
Date: Fri Jun 8 16:28:07 2007
New Revision: 4061
Modified:
vic/branches/mpeg4/video/grabber-v4l2.cpp
Log:
V4l2-VIDIOC_DQBUF.patch from Doug Kosovic (8june 07) :
it fixes an issue with some V4L2 drivers when you toggle the transmit button to off, the vic GUI stops responding because of broken logic in V4l2Grabber::stop().
Modified: vic/branches/mpeg4/video/grabber-v4l2.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-v4l2.cpp (original)
+++ vic/branches/mpeg4/video/grabber-v4l2.cpp Fri Jun 8 16:28:07 2007
@@ -637,12 +637,16 @@
if ( fd_ > 0 ) {
i = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if ( (err = ioctl(fd_, VIDIOC_STREAMOFF, &i) ) )
- debug_msg("v4l2: VIDIOC_STREAMOFF failed\n");
+ debug_msg("V4L2: VIDIOC_STREAMOFF failed\n");
}
tempbuf.type = vimage[0].vidbuf.type;
- while ( !(err = ioctl(fd_, VIDIOC_DQBUF, &tempbuf)) )
- debug_msg("v4l2: dequeued old buffer\n");
+ while ((err = ioctl(fd_, VIDIOC_DQBUF, &tempbuf)) < 0 &&
+ (errno == EINTR));
+
+ if (err < 0) {
+ debug_msg("V4L2: VIDIOC_DQBUF failed: %s\n", strerror(errno));
+ }
for (i = 0; i < STREAMBUFS; ++i) {
if (vimage[i].data)
More information about the Sumover-dev
mailing list