I’m trying to write a CoreMediaIO DAL plugin that will expose a virtual camera. Now, I’d like to be able to send data (frames) to this via another application. To accomplish this, I want to expose a simple UDP server. I looked at XPC services and they seem complicated. The architecture I want is:
Photo Booth <--> DAL plugin
^
|
UDP Server (listen port 12345)
^
|
My App (send frames to 12345)
Using the Networking framework and this tutorial as reference, I have a simple UDP server which I want to run at port 12345.
Every time my virtual camera executes, my server never launches. The error I see is following:
stateDidChange(to:): Server failure, error: The operation couldn’t be completed. (Network.NWError error 0.)
stateDidChange(to:): POSIXErrorCode: Operation not permitted
Seems like a permission issue. What choices do I have to get around this? If I go the route of XPC/Mach ports, will there be a similar issue?
Thanks for your help!