Re: [libdc] Could not create LocalIsochPortInterface (OS X)
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Mark <mar...@go...> - 2008-02-26 20:58:04
|
The problem persists, somehow my stress tests don't catch it. Got a reply from Apple, what I found out below is not relevant - libdc should work fine as it is. We also used a utility (ioclasscount) before/after the problem to see if there are any FW leaks. None found. Next step is to use the debug firewire libs from Apple to see if I can find out what's the cause. Now, while doing these series of tests I noted that I'm also constantly getting corrupted frames.... se the next thread. Mark On 22.02.2008, at 14:52, Mark wrote: > Hi David, > I didn't get an answer from the Apple FW list yet, but in the > meantime I look over all the IOKit FW code. Guided by coders > intuition I found out the following: > > > 1) macosx/control.c > (*plugin_interface)->QueryInterface (plugin_interface, > CFUUIDGetUUIDBytes (kIOFireWireDeviceInterfaceID), > (void**) &iface); > > Looking at the header, kIOFireWireDeviceInterfaceID is said to be > obsolete and should not be used. kIOFireWireDeviceInterfaceID_v8 is > the version shipped with Tiger, as I'm building libdc as framework > on Leopard and my apps are Leopard only I have used > kIOFireWireDeviceInterfaceID_v9. > > 2) macosx/capture.c > loc_port = (*d)->CreateLocalIsochPort (d, false, dcl_program, > kFWDCLSyBitsEvent, 1, 1, > nil, 0, &(capture->databuf), 1, > CFUUIDGetUUIDBytes > (kIOFireWireLocalIsochPortInterfaceID)); > > Again, looking at the header the newest version of > kIOFireWireLocalIsochPortInterfaceID is > kIOFireWireLocalIsochPortInterfaceID_v5, though in this case the > later versions are not said to be deprecated. > > I don't fully understand how IOKit works, but it is likely that the > different versions really return different "code" from Apple, > possibly the old versions have bugs that where later fixed. > > By using a newer version of kIOFireWireDeviceInterfaceID there's a > new method for creating the Isoch port - the main change is that it > allows some options to be passed: CreateLocalIsochPortWithOptions, I > have also played with that a bit. > > > > To test the effect of the changes I added a "stress test" to my app: > I'm changing from SD to HD resolution twice a second. We've had > thousands of switches and the error did not occur - even between > sleeps. > > We still eventually see failures trying to set camera parameters - > but I guess this is more related to the Pike. > > I'll se if someone at Apple can teach me what all these different > versions mean. > > Thanks > Mark |