Re: [libdc] use of fileno to implement timeout
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: David M. <dcm@MIT.EDU> - 2007-11-20 06:27:47
|
I've gotten it to work for sure in the past. I have a couple questions: 1. Exactly how is it failing? Is the select never returning? Always returning immediately, or something else? 2. Are you using juju or the raw1394 backend of libdc1394? Which distribution are you running? 3. Does capture work correctly when not using select()? 4. Which version of the library are you using? SVN head, or one of the release candidates? I did notice one bug in your code: I think you are only calling FD_SET once. However, you need to call this before every invocation of select(), since prior invocations of select() may zero out the fd_set if the select() returns due to timeout, for example. -David On Mon, 2007-11-19 at 20:27 -0800, Andrew Straw wrote: > Hi, > > I have tried, unsuccessfully, to use a fileno [returned by > dc1394_capture_get_fileno()] to listen for new frames, and timeout > otherwise, by using select() on linux (2.6.20 and 2.6.22). Is anyone > willing to share some example code where this works? > > My implementation attempts are at > http://code.astraw.com/projects/motmot/browser/trunk/cam_iface/src/cam_iface_dc1394.c > , in particular in the CamContext_grab_next_frame_blocking_with_stride() > function, where select() is called -- currently commented out. (I plan > on announcing this library more widely at some point...) > > Thanks, > Andrew > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Mailing list for libdc1394-devel > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libdc1394-devel |