<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm trying to capture still images from an iSight camera (without using Quartz).  My current approach is:<div><br></div><div>1.  Set up a QTCaptureView and connect it to a QTCaptureSession which is in turn connected to the camera.</div><div><br></div><div>2.  Install a delegate in the QTCaptureView to intercept the images and make copies of them when needed.</div><div><br></div><div>(Just grabbing the images directly from the QTCaptureView turns out not to work.)</div><div><br></div><div>The type signature for the relevant delegate method is:</div><div><br></div><div><span class="Apple-style-span" style="font-family: monaco; font-size: 11px; ">- (<a href="http://developer.apple.com/documentation/GraphicsImaging/Reference/QuartzCoreFramework/Classes/CIImage_Class/Reference/Reference.html#//apple_ref/doc/c_ref/CIImage" target="_top" style="color: rgb(0, 0, 255); text-decoration: none; ">CIImage</a> *)view:(QTCaptureView *)<i style="font-family: 'lucida grande', geneva, helvetica, arial, sans-serif; font-size: 12px; font-style: italic; ">view willDisplayImage</i> :(<a href="http://developer.apple.com/documentation/GraphicsImaging/Reference/QuartzCoreFramework/Classes/CIImage_Class/Reference/Reference.html#//apple_ref/doc/c_ref/CIImage" target="_top" style="color: rgb(0, 0, 255); text-decoration: none; ">CIImage</a> *)<i style="font-family: 'lucida grande', geneva, helvetica, arial, sans-serif; font-size: 12px; font-style: italic; ">image</i></span></div><div><br></div><div>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):</div><div><br></div><div><div>(defclass qtc-window-delegate (ns:ns-object)</div><div>  ((container :initarg :container))</div><div>  (:metaclass ns:+ns-object))</div><div><br></div><div>(objc:defmethod (#/view:willDisplayImage: (:* (:struct #>CIImage)))</div><div>                ((self qtc-window-delegate)</div><div>                 (viewptr (:* (:struct #>QTCaptureView)))</div><div>                 (imgptr (:* (:struct #>CIImage))))</div><div>  (setf *imgptr-type* (type-of imgptr))  ; For debugging</div><div>  imgptr)</div><div><br></div><div>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:</div><div><br></div><div><div>? *imgptr-type*</div><div>NS:C-I-IMAGE</div><div><br></div><div>Why?</div><div><br></div><div>rg</div><div><br></div></div></div></body></html>