Syphon / Syphon-Framework

Syphon is a Mac OS X technology to allow applications to share video and still images with one another in realtime, instantly.
Other
457 stars 79 forks source link

'kIOSurfaceIsGlobal' is deprecated, Syphon apps will break upon its removal #47

Open paulreimer opened 5 years ago

paulreimer commented 5 years ago

I believe Syphon apps as currently designed require the kIOSurfaceIsGlobal flag set on the IOSurface published by the server, in order to be shared by clients via a globally shared IOSurfaceID.

However, this feature is deprecated since macOS 10.11, and when it is removed, I believe Syphon apps will break.

warning: 'kIOSurfaceIsGlobal' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]

I suppose a globally accessible buffer with screen contents is considered a security hole, and nowadays the specific IOSurface should be shared explicitly between client/server through some IPC mechanism, as suggested in this forum post:

You should use IOSurfaceCreateXPCObject() or IOSurfaceCreateMachPort() and then transfer the resulting object or port to the other process(es) through the appropriate IPC mechanism. Those other processes can use IOSurfaceLookupFromXPCObject() or IOSurfaceLookupFromMachPort() to get a reference to the IOSurface from the object or port. https://forums.developer.apple.com/thread/18958

Is my read on this correct? Syphon will need such an IPC channel added to the design for sending IOSurfaces, and all Syphon apps (clients + servers) will need their Syphon.framework updated to a version which knows about the IPC method to publish/discover Syphon servers.

bangnoise commented 5 years ago

Yes. As yet there is no indication the API will be removed, but we aim to have an updated IPC method before that eventually happens.