lvsti / CoreMediaIO-DAL-Example

Apple's CoreMediaIO DAL plugin example - modernized

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

recording multiple devices

simentt opened this issue · comments

can we use this approach for recording multiple devices at a time?

I'm not sure about your use case but there are much higher level APIs in AVFoundation to record multiple media sources at once and mix them on the fly. If you have a custom hardware with two sources then yes, it is possible to modify this example so that you expose the two sources as one if that's what you want.

Thanks, I am sorry that I did not express my needs clearyly. I used to use CoreMediaIO and AVFoundation(like ios-minicap) to record iOS screen in real time via Mac.I tried to create 2 instances to record 2 devices, But only one is recorded.So I want to achieve this by making multiple DAL plugIn.Just a guess!

Apparently others have had this issue as well: https://forums.developer.apple.com/thread/12834

I think writing a DAL plugin may be overkill for this case, unless there is really no other solution, and even then I'm not sure how it would work. You would have to stream the screen contents somehow from the phone(s) to the mac (globally, not just from one app), run a server accepting those connections, feed the packets into the DAL plugin and consume them from the recording app... doesn't quite sound like a weekend project 😛

For now, you could try inspecting the capture devices in the multi-phone setup with this utility: https://github.com/lvsti/Cameo . You should be able to see whether the system properly spawns 2 plugin instances (or perhaps 1 plugin with 2 devices). Or even easier, open QuickTime, select New Movie Recording and try selecting both of your iOS devices as video source. Let me know what you found.