[Openmcl-devel] isight video data stream

Marko Tapio Manninen mmstud at gmail.com
Fri May 16 12:43:58 PDT 2008


Gary Byers kirjoitti 16.5.2008 kello 7.55:

> 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 went thru tutorials and its quite straightforward as you said. Im  
not familiar with objc notation, but i also watch some interface  
builder lessons with xcode from youtube. Then i made tutorial of ui- 
elements, but adding capture view in place of button didnt work way i  
tried...

>
>
> 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.)

Id like to confirm, if this is:

mCaptureSession = [[QTCaptureSession alloc] init];

in lisp:

(setf mCaptureSession (#/alloc ns:q-t-capture-session))

? Im new to ccl + objc also, so what im mostly interest here is:


QTCaptureDevice *device = [QTCaptureDevice  
defaultInputDeviceWithMediaType:QTMediaTypeVideo];
success = [device open:&error];

mCaptureDeviceInput = [[QTCaptureDeviceInput alloc]  
initWithDevice:device];
success = [mCaptureSession addInput:mCaptureDeviceInput error:&error];

[mCaptureMovieFileOutput setDelegate:self];

[mCaptureView setCaptureSession:mCaptureSession];

[mCaptureSession startRunning];

I mostly have no idea, how these are presented in ccl...

>
>
> (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.
>

Latter is correct in my environment.

>
> 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
>>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20080516/040ffc39/attachment.htm>


More information about the Openmcl-devel mailing list