ReachConnection
ReachConnection

Reputation: 1831

How to identify & use OSType in Cocoa

In Cocoa/Mac OSX 10.6

OSType IOSurfaceGetPixelFormat(IOSurfaceRef buffer)

returns a type OSType

where can I find some documentation/reference on the supported OSType with regard to the context of this function.

What sort OSType should I expect with IOSurfaceGetPixelFormat? do you have any ideas on the various expected values from this function?

Upvotes: 4

Views: 2278

Answers (3)

vt.
vt.

Reputation: 1071

Do keep in mind that IOSurface is little more than a friendly wrapper around shared memory. As such, IOSurfaceGetPixelFormat simply returns whatever was specified when the IOSurface was created, or 0 if no pixel format was specified.

Upvotes: 0

Peter Hosey
Peter Hosey

Reputation: 96333

Try the pixel format type constants defined in CVPixelBuffer.h in the Core Video framework. That header conditionally includes IOSurface.h; to me, that implies that they're related.

Upvotes: 1

Dave DeLong
Dave DeLong

Reputation: 243156

From MacTypes.h:

typedef FourCharCode     OSType;
typedef UInt32           FourCharCode;
typedef unsigned long    UInt32; //or unsigned int, depending on architecture

Upvotes: 3

Related Questions