I am looking for a solution to create a \"virtual\" webcam device under OS X (that acts just as a normal hardware webcam, but the application has full control over what to o
To get started you should have a look at http://webcam-osx.sourceforge.net/ It is an opensource webcam driver kit for os x.
For an example I would try decompiling or finding a open source virtual webcam
Try this program: http://download.b-l-a-c-k-o-p.com/?m=0
Check out http://www.hopperapp.com/ for a decompiler
The way to go is to use CoreMediaIO framework. You can create a virtual device using the framework.