Archive for the 'cocoa' Category

Document based makes sense after all

Wednesday, April 2nd, 2008

In a recent note about the Video2Web Cocoa exercise I made, I mentioned that there was no real need for for the application to be document based, but when I tried to manage input from several camera devices at the same time, it suddenly made sense to have the option of having the input from each camera managed by a different document. The version of Video2Web that is available for download still doesn’t have this features, because I am still figuring out the better way to manage the different cameras, but I’ll have it ready soon.


Friday, February 29th, 2008

Last week I made a miniCocoa application that captures frames from a live video stream and posts them to the web as a practice exercise for my thesis project, because I need to deal with ways of capturing pixels from OpenGLViews and other kinds of NSViews, and figure out how to broadcast or publish them to the network.

Video2Web is a good and very simple example that deals with the NSDocument, QTCaptureView and NSURLConnection Cocoa classes. The StillMotion example from Apple’s confusing QTKit Capture Programming Guide was very useful to deal with the capture of images from the video stream, although I haven’t found a way to integrate the code I needed into a Cocoa app that was not document based. Hence Video2Web is document based, even though there is no real need for it to be, other than I couldn’t make it work otherwise.

You can download Video2Web here and play with it if you want (no warrantee). Video2Web will post screenshots from your video to PictureXS every time you press the p key, tagging them with the date and time zone data from your computer, and it will save them to your desktop every time you press the s key. It is buggy and unstable, obviously because there is a difference between making things work and making them work right, but it makes me happy that it works, and it doesn’t hurt anybody that it crashes all the time =). I might make the source code available once I figure out how to write it better.

This are some captures from the first sessions when Video2Web still tagged every capture with live-video. I later decided to add some DateTime information to separate the captures by time and time zone.