[Openmcl-devel] isight video data stream
Gary Byers
gb at clozure.com
Thu May 15 21:55:30 PDT 2008
These are often famous last words, but porting Apple's "MyRecorder"
sample application from ObjC to CCL looks like it'd be straightforward.
<http://developer.apple.com/samplecode/MYRecorder/index.html>
Unfortunately, when I tried to run the sample program, I saw images of a
puzzled-looking middle-aged guy staring back at me.
The example's referenced in a tutorial
<http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitCaptureProgrammingGuide/Introduction/chapter_1_section_1.html>, which Matt mentioned
a few months ago.
I think (if I understand correctly) that a lot of the hard work is
done via the QTVideoCaptureView class; in IB 3.0, you can easily embed
such a view in a window (I'd have to assume that you can create such a
view procedurally as well.) In the example, an instance of a custom
controller class is made the window's delegate object and receives an
#/awakeFromNib mssage when the .nib is loaded; the controller class's
#/awakeFromNib method initializes a video capture session and capture
device and hooks everything up to the QTVideoCaptureView; the
example's controller class defines a few additional methods to clean
up on window-close and hook up start/stop buttons.
That all -looks- like it wouldn't be much more code in CCL than the
few dozen lines of ObjC code in the example, and it looks like the
hard parts would just involve connecting things up between the nib
and the implementation (and not wrestling with Quartz Composer issues
that Ron Garret had to wrestle with a few months ago, at least in order
to get something basic running.)
I would guess that QTVideoCaptureView is new in Leopard; doing this
in a way that would work in Tiger as well might indeed involve dealing
with things at the Quartz Composer level.
(If we already got this far in the discussion of a few months ago and
there were in fact subtle issues, sorry for saying "hey, it looks
easy". But it does.)
Note that QTKit (like other Cocoa addon frameworks) isn't ordinarily
loaded into the IDE world; in order to load the framework and make
the things defined by its interfaces known to the bridge, you have
to do:
(objc:load-framework "QTKit" :qtkit)
The rules that're used to map between ObjC and Lisp class and method
names might need to be tweaked a bit so that we get
QT-VIDEO-CAPTURE-VIEW instead of Q-T-VIDEO-CAPTURE-VIEW; I'm not
sure.
On Thu, 15 May 2008, Marko Tapio Manninen wrote:
> Anyone willing to help, how to get isight video stream with OpenMCL? I
> followed some thread of isight picture capture, but i didnt quite get
> it and wasnt able use that info yet.
>
> I have Clozure Common Lisp Version 1.2-r9226-RC1 (DarwinX8664)!
>
> Regards,
> Marko
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
More information about the Openmcl-devel
mailing list