the ImageCapture SDK baffles me

Dear Lazyweb, I'm lost in a maze of twisty APIs, all alike.

So, this thread seems to be talking about exactly the kind of thing I'm trying to accomplish: find a connected camera; ask it what capabilities it has; and then send (undocumented) PTP commands to it to do other things, like grab the current viewfinder image.

But, the code posted in that thread references symbols that I can't find any documentation for or definitions of, like kICAMessageCameraPassThrough (which seems to be the ICAObjectSendMessage() argument that lets you compose raw PTP commands). That sounds like something that should be in ICACamera.h or one of the other ICA headers in ImageCapture.framework, but it's not.

Then I found Image Capture SDK for Mac OS X v10.4 (from here) which contains those symbols. So, this sounds like, I have to install this API in order to do these things. A little odd that it's not installed by default, but whatever.

But... WTF is this thing? This DMG doesn't include an installer. It includes an XCode project that builds an application, not a framework (and that application appears to do nothing).

This must be some new usage of the word "SDK" with which I was previously unfamiliar.

    Update: Current best guess is that there is no installer because the ImageCapture API is pre-installed on 10.x as a part of Carbon... but, what's in this DMG documents some hypothetical future version of this SDK, so a bunch of interesting symbols that really oughta someday be a part of it are just dumped willy-nilly into the sample application?

And to add insult to injury, the definitions of the structures in the header files use C++ syntax that doesn't work from Objective C code. Nice. (Update: apparently .mm means "ObjC++" which is a bastard hybrid that mostly works.)

Can any of you make any sense out of this? Or do you know someone at Apple who might be able to? Since that mailing list archive helpfully obfuscates email addresses (fuck you, you fucking fucks) I can't even mail any of the people involved in that thread to ask for clues.

I did get a copy of Canon's "official" SDK, but it looks kind of horrible, so I'd rather do things by following the Apple Party Line instead, since that really seems like it would have to be the least painful route. (Likewise for any approach that involves trying to port some janky-assed Linux software to MacOS.)


Maybe I should be doing this with some other API instead, but I can't tell. The USB stuff in IOkit.framework seems way too low level; like, I saw no way to ask a device, "are you a camera? do you provide pictures?" but only ways to ask them things like, "are you product 0x1ABC from vendor 0xFF0A?"

Something I read somewhere said that Quicktime was the way to go for getting images out of still cameras, but my experience with all the Quicktime-related docs on developer.apple.com is that they are basically, "this is how it used to work in MacOS 8." What's up with that?

Tags: , , ,

I hate you, Milkman Baconmonkey.

Tags:
Current Music: Moev -- Head Down ♬