I'm attempting to get capture working on macosx. I had to make some minor patches to get things running: (1) malloc.h does not exist on macosx, only need stdlib.h (viewfinder.c) (2) when iterating through usb devices, should check that dev->config is not null before trying to access it (find_device, in ptp-utils.c)
After this, the start command is somewhat functional, but not quite. The camera lens opens, but the server process encounters an error and dies. Here's the output I get. capture> start msg_send 4: start msg_get 6: start PTP: Opening session getting D045 = 0001 (0x2001) setting D045 to 0001 (0x2001) getting D02E = 5000 (0x2001) getting D02F = 1400 (0x2001) getting D02E = 5000 (0x2001) getting D02F = 1400 (0x2001) getting D045 = 0001 (0x2001) setting D045 to 0004 (0x2001) usb event: code=storage info changed sid=0001 tid=000C p1=10001 p2=0000 p3=0000 msg_get 4: error 2 - get: No such file or directory The last line is just because the server process died. Here's the backtrace from gdb. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000008 #0 ___spin_lock () at /System/Library/Frameworks/System.framework/PrivateHeaders/ppc/cpu_capabilities.h:179 #1 0x9078df78 in CFRunLoopStop () #2 0x90a6c830 in IODispatchCalloutFromCFMessage () #3 0x9076adbc in __CFMachPortPerform () #4 0x9076acd0 in __CFRunLoopDoSource1 () #5 0x9075d3e8 in __CFRunLoopRun () #6 0x9075ca18 in CFRunLoopRunSpecific () #7 0x0166a970 in usb_bulk_transfer (dev=0x8, ep=2, bytes=0xbfffed5c "\f", size=12, timeout=131072, rw_async=0x145f98c <IOUSBInterfaceClass::interfaceWritePipeAsync(void*, unsigned char, void*, unsigned long, void (*)(void*, int, void*), void*)>, rw_async_to=0x145fa3c <IOUSBInterfaceClass::interfaceWritePipeAsyncTO(void*, unsigned char, void*, unsigned long, unsigned long, unsigned long, void (*)(void*, int, void*), void*)>) at darwin.c:825 #8 0x0166ab50 in usb_bulk_write (dev=0x166d008, ep=-536870165, bytes=0x0, size=1, timeout=72) at darwin.c:872 #9 0x0000446c in ptp_write_func (bytes=0xbfffed5c "\f", size=12, data=0xce1c) at ptp-utils.c:195 #10 0x0007d900 in ptp_usb_sendreq () #11 0x0007e34c in ptp_transaction () #12 0x00082508 in ptp_canon_checkevent () #13 0x000051ec in ptp_checkevent (settings=0xcd60, fill_event=0x0) at ptp-utils.c:409 #14 0x0000729c in start_handler (cmd=0xc7bc, args=0x0) at commands.c:150 #15 0x00006734 in exec_cmd (arg=0x0) at server.c:210 #16 0x00006350 in run_server () at server.c:153 #17 0x000039ac in main (argc=2, argv=0xbffff4fc) at capture.c:342 I'm not an expert on libusb, so I don't know what this might mean. I do know, however, that running "ptpcam -c" from the libptp2 package does work fine for capturing a single image, and it uses a somewhat different series of libptp calls. At one point, I thought my problem might be that I was using version 1.1.0 of libptp2 instead of 1.0.1 as is mentioned in the capture README, but it turns out that it doesn't make any difference, and the errors are the same. Would someone like to help me figure this out? Ivan ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Capture-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/capture-devel
