Built a small utility to use my iPhone as a webcam for my Mac, so I can use in my Mandarin classes. Was a pretty fun project: the iPhone gets the raw pixel buffer, live-encodes it to H.264 (using Apple's C-based VideoToolbox), passes it through USB 1/
920102
cookie jar (i)
to an app running on the Mac which decodes the H.264 stream (using the same VideoToolbox API) and sends it, via UNIX socket, to my fake webcam driver that I wrote so it appears as a webcam on Zoom calls! 2/
920103
Was pretty fun learning how to use those APIs. VideoToolbox is old, but great to use (and I learned a lot about encoding). usbmuxd was used to make the USB transfer of the feed and I already knew about the good old UNIX sockets. 3/
920104