On Thu, Jan 02, 2003 at 12:13:03PM +0900, Yukihiro Matsumoto wrote: > Hi, > > In message "sysread of /dev/video with threads" > on 03/01/02, Pat Mahoney <pat / tinyleaf.org> writes: > > |Can someone explain why the following code does not work? > > Hmm, probably select(2) does not show "ready" for /dev/video0 for your > system. Could you try > > ruby -e 'p IO.select([File.open("/dev/video0")])' > > and send us result? Indeed, the command never completes. The case is the same for my 2 different webcams. For what it's worth, webcam software gqcam grabs an image from the camera the same way I do (via IO#sysread or read(2) ) while running gtk_main() in a seperate thread. Unlike my script, it uses video4linux ioctl's before reading from the device (which is necessary for most video4linux drivers; the driver for one of my webcams is an exception). Is it possible that issuing some video4linux ioctl would fix this? I appreciate your reply and apoligize for my lack of knowledge... what should I be reading to better understand this? On a slightly different note, are there any ruby libraries that implement ioctl API's that I could use as examples if I write something for video4linux? Thanks -- Pat Mahoney <pat / tinyleaf.org>