Re: [libdc1394-devel] dc1394_capture_dequeue hangs on os x after unclean quit
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Ulrich v. Z. <uz...@li...> - 2007-03-18 12:31:37
|
Aaron Stafford wrote: > I am using libdc1394 (version 2) on os x to read images off of a > dragonfly camera from point grey. I wrote some code that uses > DC1394_CAPTURE_POLICY_WAIT with the dc1394_capture_dequeue. In general > everything works great, but... > > If I control-c out of my application (i run it from a terminal), rather > than exiting it nicely, and then try and run my application again within > a few seconds everything will work for about a second and then > dc1394_capture_dequeue just hangs and never recovers. > > If I put it in DC1394_CAPTURE_POLICY_POLL mode instead and run the code > again rather than the blocking that I experienced previously > dc1394_capture_dequeue ends up returning an error of -2 (the error > string for this is "null"). > > Is there a solution to this? I can't guarantee that my program will > always exit nicely. I don't know what we're doing differently, but we use odc1394_capture_dequeue_dma(m_pCamera, DC1394_VIDEO1394_WAIT); on os x, and I just checked. The problem doesn't appear here. It might be that the *_dma functions don't have the issue. It might also be an issue with different versions of the library (2.0rc4 here), or something entirely different. You can have a look at our code here to see what we're doing differently: https://www.libavg.de/websvn/listing.php?repname=libavg&path=%2Ftrunk%2Flibavg%2Fsrc%2Fimaging%2F&rev=0&sc=0 Most of the camera stuff is in Camera.cpp. Regards, Uli |