seanchas116 / SimpleDALPlugin

Simple CoreMediaIO DAL virtual camera plugin example written in Swift
MIT License
150 stars 19 forks source link

[question] send frames from unity3d to the SimpleDALPlugin #4

Closed bomanden closed 4 years ago

bomanden commented 4 years ago

Hi interesting project, Would it be possible to integrate your SimpleDALPlugin with unity3d ? How to send frames SimpleDALPlugin.

PhilippMatthes commented 4 years ago

Maybe, as an entrypoint, you could use the Unity scripting API to obtain the virtual webcam as a texture:

https://docs.unity3d.com/ScriptReference/WebCamTexture.html

seanchas116 commented 4 years ago

The Windows version of it (https://github.com/schellingb/UnityCapture) would be a good reference. UnityCapture consists of a Windows virtual camera implementation and a Unity plugin that sends frames to the virtual camera via a memory-mapped file. The same mechanism could be used (create a Unity plugin that captures frames of Unity cameras and send it to SimpleDALPlugin-derived virtual camera implementation via IPC).

xocialize commented 4 years ago

Do you have a suggested IPC? I’m looking into doing something similar and was considering https://github.com/swiftsocket/SwiftSocket

This is my first try at IPC and I haven’t gotten started so I’d be very open to suggestion.

ldenoue commented 4 years ago

if unity3d renders something in an NSWindow, you could grab that window from the plugin using its WindowID.

PhilippMatthes commented 4 years ago

@seanchas116 I think you can close this issue, due to nobody having contributed to this discussion for almost 30 days.

Raj123456788 commented 3 years ago

Folks, can someone please answer my question?