[Openmcl-devel] isight video data stream

Gary Byers gb at clozure.com
Fri May 16 19:56:07 UTC 2008



On Fri, 16 May 2008, Marko Tapio Manninen wrote:
> 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...

mCaptureSession is presumably a slot in the controller object (as are
the other things being assigned to above.)

So, you can either do:

(setf (slot-value self 'mCaptureSession) (#/init (#/alloc ns:q-t-capture-session)))

(setf (slot-value self 'QTCaptureSession) (#/deefaultCaptureDeviceWithMediaType ...))

or use WITH-SLOT-VALUES

(with-slot-values (mcapturesession qtcapturesession ...) self
   (setf mcapturesession (#/init (#/alloc ...))) ; SETQ would also work here




More information about the Openmcl-devel mailing list