[Openmcl-devel] Why is my pointer not a pointer?
ron at awun.net
Wed Jul 16 19:13:54 UTC 2008
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:
- (CIImage *)view:(QTCaptureView *)view willDisplayImage :(CIImage
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))
(objc:defmethod (#/view:willDisplayImage: (:* (:struct #>CIImage)))
(viewptr (:* (:struct #>QTCaptureView)))
(imgptr (:* (:struct #>CIImage))))
(setf *imgptr-type* (type-of imgptr)) ; For debugging
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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel