Re: [libdc1394-devel] Problems running libdc1394 on intel Mac under rosetta
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Damien D. <ddo...@is...> - 2007-09-26 02:55:30
|
Hello David, On Tue, 2007-09-25 at 22:11 -0400, David Rokeby wrote: > I have been trying to get libdc1394 working within a plugin that must > stay PowerPC native. It works fine on PowerPC machines. On Intel > machines, it runs properly until the final buffer of the ring buffer, > then stops. That is to say, if I have 8 DMA buffers, I get seven > images, and then the capture callback ceases being called, and > capture_dequeue reports no frame available. > > > The capture needs to be set up again before I can read another set of > images. > > > As my immediate needs are only for single images at 30 second > intervals, I thought I might set up a call to my capture setup code > (which is based on "InitIOneIDCCamera" from one of the examples) each > time I wanted a new image, but I have found that this process leaks 2 > mach ports per setup which makes me worry about running this long term > (which is my intention). > > > Any ideas regarding the Rosetta problem or the apparent port leak > would be appreciated. I am no expert on mach ports, but I am guessing > the ports are related to either the pipe and/or the socket set up in > capture_setup. These appear to be being correctly disposed of, but I > am over my head when it comes to really verifying this. > > > basically the setup routine does the following (I am leaving out lots > of configuration stuff local to my code) > > > if( camera -> capture_is_set ) > { > dc1394_video_set_transmission(camera, DC1394_OFF); > dc1394_capture_stop( camera); > } > dc1394_video_set_iso_speed( camera, isoSpeed ); > dc1394_video_set_mode( camera, mode ); > dc1394_video_set_framerate( v -> camera, rate ); > dc1394_capture_setup( camera, 8, DC1394_CAPTURE_FLAGS_DEFAULT ); > dc1394_video_set_transmission(camera, DC1394_ON); > > > It looks to me like dc1394_capture_stop() cleans up all the possible > ports created by dc1394_capture_setup(), but I must be missing > something... Are you regularly enqueuing the buffers that you have dequeued? I suppose you do since it works on mac but it's better to check this twice ;) Damien -- _ Damien 高原 Douxchamps ('- Assistant Professor //\ Image Processing Laboratory, NAIST V_/_ http://damien.douxchamps.net/ |