Finally got around to learning how to compile and hack on GEM, and I've made some progress on this. Here's what I did.
First, I didn't get the whole deal about the colorspace, so was trying to use RGB with my iSight, which is wrong. "colorspace YUV" was the first step. I got it this far:
v4l2: changed size from 64x64 to 320x240
v4l2: GEM: pix_video: Opened video connection 0xB
However, I kept getting this error:
VIDIOC_DQBUF: stopping capture thread!: Resource temporarily unavailable
Looking through the source for pix_videoNEW, I found where this was happening.
In videoV4L2.cpp, videoV4L2::capturing()
if (-1 == xioctl (m_tvfd, VIDIOC_DQBUF, &buf)) {
switch (errno) {
case EAGAIN:
perror("VIDIOC_DQBUF: stopping capture thread!");
goto stop_capturethread;
case EIO:
/* Could ignore EIO, see spec. */
/* fall through */
default:
perror ("VIDIOC_DQBUF");
}
}
I don't know what an "EAGAIN" error is. Maybe it means "You should try again!", instead of giving up and closing.
so I took it out, and now I get video in my gem window! yay! it's slow and still has a lot of errors streaming out all the time, but it works!
Edit: ok, that is what EAGAIN means:
"By default VIDIOC_DQBUF blocks when no buffer is in the outgoing queue. When the O_NONBLOCK flag was given to the open() function, VIDIOC_DQBUF returns immediately with an EAGAIN error code when no buffer is available."
http://v4l2spec.bytesex.org/spec/r12878.htm
So it just means a capture buffer isn't filled yet, rather than a total failure. The investigation continues...