Archive for October 8th, 2009

08
Oct

IOSurface

If you’re the excessively inquisitive sort, perhaps you’ve noticed that there’s a new framework in the public 10.6 SDK, IOSurface.framework — that has absolutely no mention in the documentation whatsoever past the single line here

Contains low-level interfaces for sharing graphics surfaces between applications.

Not big on documentation, apparently, the IOSurface folks. But here’s some detail for you as to why it exists and what it’s good for:

As one of the long overdue issues, not to mention all the limitations derived from its venerable age, Apple has introduced a first step to the future of the old Quicktime (that will stay in 32 bit universe) with the new Quicktime X: however, Quicktime isn’t so easy to replace in one shot, and it’s still present in the system, transparently invoked by Quicktime X (or, for us developers, by QTKit) whenever it’s needed.But, how can a 64-bit software (like the Quicktime X Player, or the Finder itself) use a 32-bit library? The answer is, it doesn’t, the technique used behind the scenes is far more interesting: when a 64-bit software needs a frame from a movie it can’t process otherwise, a specific software is launched (you’ll see it in the Activity Monitor as QTKitServer-(process-ID) process-name) that gives back the frames to the 64-bit app.Hey, isn’t that nice? Graphics passed from one process to another, how can they do that? The answer looks like it’s in a new framework, IOSurface…

Now isn’t that nifty? Not that we have any software that uses plugins or anything like that which will have to deal with a 32 -> 64 bit transition far as we can see, but hey, if you do … IOSurface is there for you!