Re: [libdc1394-devel] dc1394_cleanup_iso_channels_and_bandwidth
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Jon S. <jon...@ho...> - 2006-12-20 17:28:44
|
On Wed, 2006-12-20 at 13:15 -0400, Alvin wrote: > On Wednesday 20 December 2006 13:07, Jon Schewe wrote: > > Here's the cleanup function that I'm using and seems to work rather > > well: > > /* helper functions */ > > void cleanup(void) { > > raw1394handle_t handle = raw1394_new_handle (); > > logger(LOG_DEBUG, "CAMERA", "Cleaning up"); > > for (int i=0; i < numCameras; i++) { > > // cleanup the dc1394 resources > > dc1394_capture_stop(cameras[i]); > > dc1394_video_set_transmission(cameras[i], DC1394_OFF); > > > > // free up the raw1394 resources > > if (raw1394_set_port (handle, cameras[i]->port) < 0) { > > logger(LOG_ERROR, "CAMERA", "Failed to set port to %d", i); > > } else { > > for (int j = 0; j < 64; j++) { > > raw1394_channel_modify (handle, j, RAW1394_MODIFY_FREE); > > } > > raw1394_bandwidth_modify (handle, MAXIMUM_BANDWIDTH, > > RAW1394_MODIFY_FREE); > > } > > raw1394_destroy_handle (handle); > > > > } > > } > > Thank you Jon. Do the raw1394_ calls effect the other devices on the firewire > bus? > They shouldn't, I haven't tested it with much else on the bus. Note that I'm only calling the raw1394 methods with handles from the cameras, so nothing else should be bothered. ________________________________________________________________________ http://lug.htc.honeywell.com/people/jschewe [Honeywell Intranet Only] *My views may not represent those of my employers |