How to identify and use OSType in Cocoa

On Cocoa / Mac OSX 10.6

OSType IOSurfaceGetPixelFormat (IOSurfaceRef buffer)

returns type OSType

where I can find some documentation / link to the supported OSType regarding the context of this function.

What type of OSType should I expect with IOSurfaceGetPixelFormat? Do you have any ideas regarding the various expected values ​​from this function?

+3
source share
3 answers

From MacTypes.h:

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

, CVPixelBuffer.h Core Video. IOSurface.h; , .

+1

Keep in mind that IOSurface is more than a friendly shell around shared memory. Thus, IOSurfaceGetPixelFormat simply returns everything that was specified when IOSurface was created, or 0 if the pixel format was not set.

0
source

Source: https://habr.com/ru/post/1720586/


All Articles