knightbenax / Cobalt

OSX Virtual Camera Plugin based on CoreMediaIO
9 stars 3 forks source link

How to send window id from another application to this plugin? #3

Open alokmahor opened 2 years ago

alokmahor commented 2 years ago

Thanks for creating this sample plugin. This plugin is recieving windowId from web application.

I do not want to use http server based approach to send windowId.

I want to send windowId from my electron.js based application. There would be way using IPC(Inter Process Communication).

How can I send windowId to this plugin?

knightbenax commented 2 years ago

Hi @alokmahor. windowId isn't coming from a web application, it's coming from the macOS companion app. I am spinning up a local http server to send the id because I couldn't find enough documentation on how to make the IPC work in the timeline that I needed it done

alokmahor commented 2 years ago

OBS mac-virtualcam is using NSMachBootstrapServer and will plan to use NSXPCConnection according to https://github.com/obsproject/obs-studio/blob/master/plugins/mac-virtualcam/src/obs-plugin/OBSDALMachServer.mm

so I guess we have to use XPC

knightbenax commented 2 years ago

That makes sense. I would find some time to play around with XPC and implement it here, that should definitely be faster. Also if you do manage to get it work, you could make a PR or share

alokmahor commented 2 years ago

Yes if I get any IPC based solution I will create pull request