[GEM-dev] [pix_video]: how to free the device?

Roman Haefeli reduzierer at yahoo.de
Wed May 19 01:33:45 CEST 2010


On Mon, 2010-05-17 at 11:07 +0200, IOhannes m zmoelnig wrote:

> i have added open/close messages to [pix_video] now.

Thanks, but the situation is worse here with snv r3302. I still can
access the USB camera and when I do so, the red light turns on. Also
does the close message work (the red LED goes off and the pix becomes
all white), but then I cannot access the camera anymore at all, even not
with the same [pix_video], altough the camera indicates, that it is not
busy. Neither switching devices nor using the 'open' message helps. When
switching the device to 1 and back to 0 and I start rendering then, I
get: 

GEM: Start rendering
start: 1 -> 0
v4l2: VIDIOC_REQBUFS: Device or resource busy

It seems like Pd is still keeping the file /dev/video0 open:

roman at yoyo2:~$ lsof | grep /dev/video0 
pd         9419      roman  mem       CHR       81,0               12422 /dev/video0
pd         9419      roman    6u      CHR       81,0      0t0      12422 /dev/video0

I have to quit Pd in order to regain access to the camera.

> btw, fw-capture (with camcorders) is starting to work again (the old
> backend was broken with the new juju stack on linux; if somebody wants
> to try the new videoDV4L2 backend with the old stack and confirm that it
> works, i will happily replace the old one...)

Oh, I hopefully be able to happily test that soon. 

Roman






More information about the GEM-dev mailing list