Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGDisplayStreamEventMBS class.

CGDisplayStreamEventMBS.FrameAvailable(Status as Integer, displayTime as UInt64, frameSurfaceHandle as Integer, Update as CGDisplayStreamUpdateMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event CoreGraphics MBS MacCG Plugin 16.1 ✅ Yes ❌ No ❌ No ❌ No
A new frame is available.

The event used for new frame delivery by CGDisplayStream objects

For each frame that is generated by the WindowServer for a particular display, the user provided event is invoked and provides the user with an IOSurface handle (inside update object), that contains the pixel data for the new frame, as well as a CGDisplayStreamUpdateMBS that contains all of the metadata associated with that IOSurface.

frameSurfaceHandle: The IOSurfaceRef for the current frame. May be zero/nil in some cases. The plugin retains it as part of Update object to keeps it alive.
displayTime: The mach absolute time of when the corresponding frame was to be displayed by the WindowServer
Update: The CGDisplayStreamUpdateMBS for the current frame. will be nil in cases when status is not kCGDisplayStreamFrameStatusFrameComplete.

Some examples using this event:

The items on this page are in the following plugins: MBS MacCG Plugin.


The biggest plugin in space...