Spurred on by interest in my Sequence Grabber source code I’ve added a whole slew of new functionality to it tonight (for various reasons this code is a lot of fun to work on). The most important change is CCoreImageView now supports Cocoa bindings and has an Interface Builder palette. This means you can easily create a view in Interface Builder and bind it to your controller/model objects without writing a line of code! CSequenceGrabberView isn’t in the palette yet but will be soon, when it is you’ll be able add iSight support to your Cocoa application without writing any code. I’ve spent some time simplifying and improving the sequence grabber video channel classes. The code is now much easier to understand and modify (a lot of this code is based on some pretty badly written Apple sample code and needed a lot of tidying up before it is readable).
The easiest way to use the sequence grabber is just to add a CSequenceGrabberView to your project. The view supports start and stop actions so you can wire your user interface directly to the view. You can also access the underlying CSequenceGrabber object directly if needed. There are plenty of hooks in the code to add your custom functionality – CSequenceGrabber (and its children video and sound channel objects) sends many useful NSNotifications. I’m also going to make the code use Cocoa bindings as much as possible. That way you can use bindings and/or notifications as your need dictates.
I’ve improved the “QuadView” sample code to take advantage of Cocoa bindings support in CCoreImageView. One thing I’ve noticed is that the core image filtering just isn’t very fast. After two or three live video streams running through Core Image filters the frame rate drops rather dramatically. I will look into this further and hope to make big improvements if my code is actually the bottleneck. Or maybe it is time to just order that Quad G5 now that they’re available (one 2.5GHz core per video stream sounds like a great idea!).
If you are having trouble building the code – remember all projects require Xcode 2.1 (or newer, I am using Xcode 2.2 for development). Also you will need subversion to check out a full copy of the code.
Finally I’ve been really encouraged by the interest that my Sequence Grabber code has generated. I’m getting a few emails a week from people using it in their projects. I love hearing about the uses people are putting the code to and encourage anyone using it to append a comment to this blog posting.