AppKitWindow
A window to draw video into.
Deliberately the smallest thing that puts a picture on screen. AppKit owns the main thread and its run loop, so the shape below is not a choice: the window is created on the main thread, runEventLoop blocks there, and playback happens on other threads and hands frames over through AppKitVideoRenderer.
This is the tier 0 presentation path, and it ships rather than being scaffolding: it is the fallback when a GPU path fails, and the reference a GPU renderer is compared against. It is also slow. Converting a frame on the CPU and building an image from it costs several milliseconds at 1080p, which is fine for a small clip and not enough for 4K. A Metal renderer that uploads planes as textures and converts in a shader is the tier 1 replacement.
Constructors
The window with an image view, or with a platform.QuartzCore.CAMetalLayer when useMetalLayer is true, for MetalVideoRenderer. The image view stays the CG fallback's home.
Properties
The layer a MetalVideoRenderer draws into; null unless built with AppKitSurface.Metal.
Called on the main thread when this window is closing, whatever closed it.
The layer a SampleBufferVideoRenderer and a picture in picture controller share. Null unless built with AppKitSurface.SampleBuffer.
Functions
Hands the main thread to AppKit.
Ends the event loop, which lets runEventLoop return.