<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Gary Byers kirjoitti 16.5.2008 kello 7.55:</div><br class="Apple-interchange-newline"><blockquote type="cite">These are often famous last words, but porting Apple's "MyRecorder"<br>sample application from ObjC to CCL looks like it'd be straightforward.<br><br><<a href="http://developer.apple.com/samplecode/MYRecorder/index.html">http://developer.apple.com/samplecode/MYRecorder/index.html</a>><br><br>Unfortunately, when I tried to run the sample program, I saw images of a<br>puzzled-looking middle-aged guy staring back at me.<br><br>The example's referenced in a tutorial<br><br><<a href="http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitCaptureProgrammingGuide/Introduction/chapter_1_section_1.html">http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitCaptureProgrammingGuide/Introduction/chapter_1_section_1.html</a>>, which Matt mentioned<br>a few months ago.</blockquote><div><br></div><div>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...</div><div><br></div><blockquote type="cite"><br><br>I think (if I understand correctly) that a lot of the hard work is<br>done via the QTVideoCaptureView class; in IB 3.0, you can easily embed<br>such a view in a window (I'd have to assume that you can create such a<br>view procedurally as well.)  In the example, an instance of a custom<br>controller class is made the window's delegate object and receives an<br>#/awakeFromNib mssage when the .nib is loaded; the controller class's<br>#/awakeFromNib method initializes a video capture session and capture<br>device and hooks everything up to the QTVideoCaptureView; the<br>example's controller class defines a few additional methods to clean<br>up on window-close and hook up start/stop buttons.<br><br>That all -looks- like it wouldn't be much more code in CCL than the<br>few dozen lines of ObjC code in the example, and it looks like the<br>hard parts would just involve connecting things up between the nib<br>and the implementation (and not wrestling with Quartz Composer issues<br>that Ron Garret had to wrestle with a few months ago, at least in order<br>to get something basic running.)</blockquote><div><br></div><div><span class="Apple-style-span" style="font-family: 'lucida grande'; "><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; ">Id like to confirm, if this is:</pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; "><br></pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; ">mCaptureSession = [[QTCaptureSession alloc] init];</pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; "><br></pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; ">in lisp:</pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; "><br></pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; ">(setf mCaptureSession (#/alloc <span class="Apple-style-span" style="font-family: 'lucida grande'; font-size: 12px; white-space: normal; ">ns:q-t-capture-session))</span></pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; "><font class="Apple-style-span" face="'lucida grande'" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;"><br></span></font></pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; "><font class="Apple-style-span" face="'lucida grande'" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;">? Im new to ccl + objc also, so what im mostly interest here is:</span></font></pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; "><font class="Apple-style-span" face="'lucida grande'" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;"><br></span></font></pre><pre style="font-size: 11px; font-family: monaco, courier, monospace; margin-top: -1px; margin-right: 4px; margin-bottom: -3px; margin-left: 6px; white-space: pre; "><font class="Apple-style-span" face="'lucida grande'" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">QTCaptureDevice *device = [QTCaptureDevice defaultInputDeviceWithMediaType:QTMediaTypeVideo];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">success = [device open:&error];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">mCaptureDeviceInput = [[QTCaptureDeviceInput alloc] initWithDevice:device];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">success = [mCaptureSession addInput:mCaptureDeviceInput error:&error];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">[mCaptureMovieFileOutput setDelegate:self];</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">[mCaptureView setCaptureSession:mCaptureSession];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">[mCaptureSession startRunning];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">I mostly have no idea, how these are presented in ccl...</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br></div></span></font></pre></span></div><blockquote type="cite"><br><br>(objc:load-framework "QTKit" :qtkit)<br><br>The rules that're used to map between ObjC and Lisp class and method<br>names might need to be tweaked a bit so that we get<br>QT-VIDEO-CAPTURE-VIEW instead of Q-T-VIDEO-CAPTURE-VIEW; I'm not<br>sure.<br><br></blockquote><div><br></div><div>Latter is correct in my environment.</div><br><blockquote type="cite"><br>On Thu, 15 May 2008, Marko Tapio Manninen wrote:<br><br><blockquote type="cite">Anyone willing to help, how to get isight video stream with OpenMCL? I<br></blockquote><blockquote type="cite">followed some thread of isight picture capture, but i didnt quite get<br></blockquote><blockquote type="cite">it and wasnt able use that info yet.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have Clozure Common Lisp Version 1.2-r9226-RC1  (DarwinX8664)!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Regards,<br></blockquote><blockquote type="cite">Marko<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Openmcl-devel mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br></blockquote><blockquote type="cite"><a href="http://clozure.com/mailman/listinfo/openmcl-devel">http://clozure.com/mailman/listinfo/openmcl-devel</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote></blockquote></div><br></body></html>