-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: move xpc_connection_create_mach_service to NSXPCConnection so that it works with QuickTime #59
Comments
I was looking all information about NSXPCConnection, and did not found any evidence that using the CoreFoudation libraries instead of libxpc makes any difference, libxpc hasn't been deprecated, and libxpc is still the base library for CoreFoudation libraries. |
I had closed this issue because I am not entirely sure why it does not work in QuickTime. I signed the plugin but this did not help. The problem is that debugging is very hard because the plugin cannot write to a log file in (/tmp) nor send debug XPC messages to the server. |
You can debug both, the plugin and the service, setting the loglevel:
and the StandardOutPath and the StandardErrorPath variables in org.webcamoid.cmio.AkVCam.Assistant.plist. |
I know, but this does not work when the plugin is loaded by QuickTime. |
I tried to write to a logging file using the working camera from the link above, and even there logging does not work (though the camera itself shows up in QuickTime). |
I suspect that the QuickTime sandbox prevents all file access (and possibly some XPC stuff). |
Running QuickTime from terminal throw some messages? |
I re-opened the issue because you said it was working with the other virtual camera. I'm right now quite busy working with Webcamoid, I won't come back to this issue until much later, but it would be useful if you can continue debugging it and give me some updates. |
Ok, I will keep you posted. But at the moment I have run out of ideas. |
I found the problem: QuickTime does not allow accessing the preferences file which is used by the plugin (Preferences.h). XPC seems to work fine but no devices are shown due to lack of access to the preferences file. |
Ok, then the idea would be reading the preferences from the service, similar to what I did with the DirectShow plugin. |
I did some testing. When using XPC for getting the device info instead of the preferences file then QuickTime works (even without signing). |
QuickTime does not work with the webcam because it does not allow accessing
xpc_connection_create_mach_service
.Moving to
NSXPCConnection
(sorry, I don't know the C++ equivalent) fixes the problem:https://github.com/obsproject/obs-studio/blob/dde4d57d726ed6d9e244ffbac093d8ef54e29f44/plugins/mac-virtualcam/src/obs-plugin/OBSDALMachServer.mm
https://stackoverflow.com/questions/54188295/nsmachbootstrapserver-is-deprecated-how-can-nsxpcconnection-be-used-to-register
The text was updated successfully, but these errors were encountered: