<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>So if there is a QuickTimePlugin, what do you need FFI for?</div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div></span></div></div><div><br></div><div>On 26.08.2010, at 05:52, John M McIntosh wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If someone wants to drag that Sophie source code into the squeak or Pharo mainstream I'll help from the side lines. &nbsp;we did re-write the code *MANY* times so it's I think fairly easy to port.&nbsp;<div><br><div>The concept is there is an abstraction that plays audio &amp; video, &nbsp;which concrete &nbsp;classes are used is dependent on the media &amp; what's on the platform, so when a URI is supplied,</div><div>I note everything in Sophie referring to a media object was a URI (memory pointer, file pointer, internet pointer), then it's passed to either quicktime which likes many flavours of URI or&nbsp;</div><div>resolved to a file path for URI friendly codecs.&nbsp;</div><div><br></div><div>Some of this was tied to tweak, but the concept was a heartbeat timer either polled every N seconds and then invalidate the form area, which later caused tweak to redraw the form, or tied to&nbsp;</div><div>the quicktime plugin which had the responsibility to fire a semaphore when a movie frame changed so that &nbsp;we didn't have to run a polling cycle.&nbsp;</div><div><br></div><div>Some people might be offended by having to use quicktime, but we realized at the time that quicktime actually *is* everywhere because people for some reason install iTunes on all their computers</div><div>so they can listen to music or watch video.... &nbsp;As for the linux folks (*cough*) well there are frameworks that pretend to offer up the quicktime api, so just compile those up as a solution or provide some api to some other codec solution.</div><div><br></div><div>So take a look at the class hierarchy at SophieMovie&nbsp;</div><div><br></div><div><br></div><div>So some porting thoughts&nbsp;</div><div>resource is of course the sophie resource that wraps the media object, it contains meta-data.&nbsp;</div><div>So for example</div><div><div>bounds</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self resource ifNil:[^self rectangle].</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^(self naturalRectangle scaleBy: (self resource applyTransformationsAgainst: 1@1)) rounded</div></div><div><br></div><div>The&nbsp;applyTransformationsAgainst: &nbsp; runs a sequence of steps to turn the 1@1 into a float between 0-1 that is applied against the natural scale of a movie.&nbsp;</div><div>This allowed the Sophie book creator to manipulate the size &amp; orientation of the media resource as a set of steps.&nbsp;</div><div>No doubt you can just return the size of the movie to simplify things where it's used to set the rectangle size for the frame via&nbsp;openMovieFromURI:</div><div><br></div><div><div>openMovieFromURI: foo</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self setupOffscreen.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self rectangle: self bounds.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self time:0. &nbsp;"This should likely go into a separate API, but it is needed to ensure clips start at the proper time 0, not the natural media's time 0"</div></div><div><br></div><div><br></div><div><br></div><div><div><div>On 2010-08-25, at 7:27 PM, Chris Cunnington wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I found the Sophie dev image ( <a href="http://dev.opensophie.org/HomePage">http://dev.opensophie.org/HomePage</a> ) and the gang's all there: MPEG; Ogg; Vorbis; Quicktime; etc.&nbsp;<div><br></div><div>Sophie is built on a&nbsp;Squeak3.8.2a image and it has functionality that people want to have in 4.1. I can watch three versions of Macbeth in Sophie. I want to do that in 4.1. I imagine the Documentation team would like that too. They could have links in the HelpSystem open movies from all over the Internet and have them play in the image.&nbsp;<div>
<br></div><div>The files are available at <a href="http://source.opensophie.org/Sophie/">http://source.opensophie.org/Sophie/</a>. This file looks promising:&nbsp;<span class="Apple-style-span" style="font-family: Times; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><a href="http://source.opensophie.org/Sophie/Sophie-Quicktime-JMM.28.mcz">Sophie-Quicktime-JMM.28.mcz</a></span><span class="Apple-style-span" style="font-family: Times; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">. When I drag it onto the World I get an error that I think is telling me I need FFI installed.&nbsp;</span></div>
<div><span class="Apple-style-span" style="font-family: Times; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></div><div><font class="Apple-style-span" face="Times"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: medium;">John, on a scale of 1 to 10 how hard would it be for people not you to play around with your code and install a video player in 4.1?</span></font></div>
<div><font class="Apple-style-span" face="Times"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="Times"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: medium;">Chris&nbsp;</span></font></div>
</div><div><font class="Apple-style-span" face="Times"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="Times"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: medium;"><br>
</span></font></div>
<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">--</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">===========================================================================</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">John M. McIntosh &lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>&gt; &nbsp; Twitter: &nbsp;squeaker68882</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Corporate Smalltalk Consulting Ltd.&nbsp;&nbsp;<a href="http://www.smalltalkconsulting.com/">http://www.smalltalkconsulting.com</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">===========================================================================</font></div><div><br></div></div></div></div></div></div></span></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></div></div><br></blockquote></div><br></body></html>