2

I want to create application where I can record video with audio and save it to disk. When application start I detect all video and audio sources and show this list on the UI. But when I disconnect one of webcams (or unplug mic), this device still remain in list.

How I can get notifications of device connect/disconnect, both for video devices(USB) and audio devices(jack 3.5).

Thank you.

WBR Maxim

rmaddy
  • 314,917
  • 42
  • 532
  • 579
kroumvud
  • 358
  • 6
  • 19

1 Answers1

1

You might find some useful tips in this other question, here IOKit device adding/removal notifications - only fire once?

I also have an example of an app that uses the IOKit framework to detect adding and removing USB devices on my github account here: https://github.com/tjarratt/Panic-Button

Baring that, the apple developer site has a lot of documentation on using USB devices: https://developer.apple.com/library/mac/documentation/devicedrivers/conceptual/USBBook/USBDeviceInterfaces/USBDevInterfaces.html

Community
  • 1
  • 1
tjarratt
  • 1,692
  • 9
  • 17
  • Thank you for your reply. I will check all what you recommend. As I can see whole information what you give this for USB devices and what about jack 3.5 for mics. Any ideas? – kroumvud Oct 11 '13 at 09:57
  • I'm not very familiar with using the 3.5" jack for mics and other audio devices, but I think the Core Audio framework will probably be of use there. – tjarratt Oct 12 '13 at 01:13
  • Hey @kroumvud did you ever find a solution for this? I'm actually finding that I'm working on a small art project involving audio inputs and I was curious if you ever solved this... – tjarratt Dec 08 '13 at 03:23
  • Hey @tjarratt sorry for late response, unfortunately I don't found any solution for now. :( May I see your art project somewhere? – kroumvud Dec 16 '13 at 09:25