16 Jul 21:12
Why is my pointer not a pointer?
From: Ron Garret <ron <at> awun.net>
Subject: Why is my pointer not a pointer?
Newsgroups: gmane.lisp.openmcl.devel
Date: 2008-07-16 19:13:54 GMT
Subject: Why is my pointer not a pointer?
Newsgroups: gmane.lisp.openmcl.devel
Date: 2008-07-16 19:13:54 GMT
I'm trying to capture still images from an iSight camera (without using Quartz). My current approach is:
1. Set up a QTCaptureView and connect it to a QTCaptureSession which is in turn connected to the camera.
2. Install a delegate in the QTCaptureView to intercept the images and make copies of them when needed.
(Just grabbing the images directly from the QTCaptureView turns out not to work.)
The type signature for the relevant delegate method is:
This method is generally used for applying filters to the image. I'm just passing the image straight through and grabbing a handle to it (or trying to):
(defclass qtc-window-delegate (ns:ns-object)
((container :initarg :container))
(:metaclass ns:+ns-object))
(objc:defmethod (#/view:willDisplayImage: (:* (:struct #>CIImage)))
((self qtc-window-delegate)
(viewptr (:* (:struct #>QTCaptureView)))
(imgptr (:* (:struct #>CIImage))))
(setf *imgptr-type* (type-of imgptr)) ; For debugging
imgptr)
This actually works (insofar as the video stream is displayed and Lisp doesn't crash) but there is a weird thing going on: I would expect *imgptr-type* to be MACPTR given the way the method signature is declared, but it's not, it's CIImage:
? *imgptr-type*
NS:C-I-IMAGE
Why?
rg
_______________________________________________ Openmcl-devel mailing list Openmcl-devel <at> clozure.com http://clozure.com/mailman/listinfo/openmcl-devel
RSS Feed