Re: [libdc1394-devel] MS Windows patch: avoiding clutter
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: David M. <dcm@MIT.EDU> - 2007-08-14 02:41:15
|
On Mon, 2007-08-13 at 21:10 -0500, Vladimir Avdonin wrote: > This is to address the situation when libdc1394 is used with > application linked with different memory management library than > libdc1394 itself. The dc1394_find_cameras allocates the memory using > malloc version from library linked to libdc1394, and the application > shall call free from the same library. On msw libdc1394 is built using > gcc, but may be linked to application build with ms visual c and > application will call its own version of free, which results in > runtime error. dc1394_free will call correct version of free. > Yes, dc1394_free() is a good idea. I suggest calling it dc1394_camera_list_free(). This only needs to be a temporary function and will not need to exist in the final 2.0 release. The plan is still to introduce a new API for libdc1394 startup and shutdown before the final release of 2.0 for all platforms. Instead of dc1394_find_cameras(), there will be something like: dc1394_t * dc1394_new (); dc1394error_t dc1394_enumerate_cameras (dc1394_t *, uint64_t *, int); dc1394camera_t * dc1394_camera_new (dc1394_t *, uint64_t); void dc1394_camera_free (dc1394camera_t *); void dc1394_free (dc1394_t *); As you can see, this API is based primarily around GUIDs for camera identification. It also will allow us to add better hotplug support, although the 2.0 release is not blocking on the actual hotplug support. -David |