Closed gxalpha closed 4 years ago
Does anyone know whether having an assistant is required? The project declares one here https://github.com/johnboiles/coremediaio-dal-minimal-example/blob/master/CMIOMinimalSample/Info.plist#L35 but that doesn't exist, does it?
I'm also unsure on how to properly work with the assistant stuff, when testing with the modernised sample it seemed like the only way to test was to put the assistant plist in /Library/LaunchDaemons/
and reboot
@gxalpha thanks for poking around here! Here are some things I can think to try:
HardwarePlugIn_AddRef
and HardwarePlugIn_Release
@brinsche I don't think we need an assistant so we could probably remove that line! The goal of this repo is to just serve blank frames from the plugin itself (without an assistant). But who knows, maybe something about CoreMediaIO wants to know about the source of the data before it will fully start the plugin. I think that's unlikely though.
What do you mean with "no stream shows up in Cameo"? For me it does, or do you mean that the Device shows no stream in its properties?
@johnboiles ok, that's what I assumed just wanted to mention it. I just tried to look at the implementation of similar apps, most seem to use an assistant but CamCamX doesn't, it's .plist also has additional keys I haven't seen before, I haven't verified that CamCamX still works though, it wasn't updated in a while
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>CamCamX.CMIO</string>
<key>CFBundleIdentifier</key>
<string>com.b-l-a-c-k-o-p.CamCamX.CMIO</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>CamCamX.CMIO</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.0.1</string>
<key>CFPlugInFactories</key>
<dict>
<key>664A1EA9-EE29-4EE1-B5F4-C6A37D0731FA</key>
<string>CMIO_PlugInFactory</string>
</dict>
<key>CFPlugInTypes</key>
<dict>
<key>30010C1C-93BF-11D8-8B5B-000A95AF9C6A</key>
<array>
<string>664A1EA9-EE29-4EE1-B5F4-C6A37D0731FA</string>
</array>
</dict>
<key>CMIOHardwareAssistantServiceNames</key>
<array>
<string>com.b-l-a-c-k-o-p.CamCamX.CMIO.unused</string>
</array>
<key>NoCMIOHardwarePlugInLazyLoadingInfo</key>
<array>
<dict>
<key>IOProviderClass</key>
<string>IOVideoCamCamXVirtualDevice</string>
</dict>
</array>
</dict>
</plist>
@gxalpha thanks for the correction :) I definitely mean the latter: "the Device shows no stream in its properties"
@brinsche it's very interesting that CamCamX defines this in its plist:
<key>CMIOHardwareAssistantServiceNames</key>
<array>
<string>com.b-l-a-c-k-o-p.CamCamX.CMIO.unused</string>
</array>
The .unused
suffix makes me think maybe CoreMedia wants you to register an assistant in the plist even if you don't need one.
Thanks for the investigation here y'all! Keep it coming!! I'm sure we can figure this out eventually.
I got a little further tonight. The source now shows up in apps, but it crashes the host app with EXC_BAD_ACCESS
. I probably have a memory management glitch somewhere in there. But I think it's close!
Hey nice!
Also it seems like this PR is obsolete now so I'm going to close it. Tho feel free to reopen it if you want it as a discussion place.
I filled in the TODO-Properties and added some that exist in obs-mac-virtualcam but not here. Does not change the behavior.
@johnboiles I feel like you are more into this than I am. I filled out the TODOs, but it obviously still doesn't work. Where do you think is the next place to work at? While the CoreMediaIO stuff is documented really bad, I think I could read myself into it, but I'd need some kind of starting point. :)