[squeak-dev] Re: Playing Flash movies in-image

John M McIntosh johnmci at smalltalkconsulting.com
Wed Dec 29 23:06:33 UTC 2010


You'll note that there are a *lot* of SophieResourceManager subclasses. 

It's goal in life was to provide a storage framework for resources and components of Sophie books. 
The concrete class are all about, is the book stored on the internet, on the local hard drive, is it a gzip file, a directory of files, a gzip file WITHOUT compression (aka OLPC support).  Oh lots of choices and different trials were made over the years  resulted in lots of subclasses... 

Ya, so make the manager, then stuff a resource into it.  You'll note it's not a MovieResource rather the SophieResource was really generic... 

Sophie NEVER NEVER NEVER thought of a resource item being a file path. Great pains to ensure the proper UTF8 URI was used and at the point where we need the actual data bits, it gets translated into something the read/write underpinnings could digest.  Fortunately Quicktime was very happy to digest URI for us. Mind there was *some* problems with quicktime on windows but I recall that Apple over time shipped some fixes.

As earlier mentioned the SophieResource is there to contain the meta-data for the movie so we avoid digging in the movie every time we need an answer, also it provided a translation layer as the different decoders had to be invoked to drag the data out to be cached within the resource's meta-data.

On 2010-12-29, at 1:32 PM, Sean P. DeNigris wrote:

> 
> 
> Sean P. DeNigris wrote:
>> 
>> I filed Sophie-Movie into trunk.  I'll see what I can come up with.
>> 
> 
> Okay, here's a first stab - Mac-only (platform temporarily hardcoded).  If
> you download:
> * FFI including Examples
> * SpdQT from http://www.squeaksource.com/SophieGoldDig
> 
> then you can evaluate the following:
> 	aURI := URI fromString: 'file:///path/to/aQuickTimeFile.flv'.
> 	manager := SophieResourceManagerFolderPackage new.
> 	resource := SophieResource basedOn: manager.
> 	resource fileURI: aURI.
> 	movie := QuickTimeMovie new.
> 	movie resource: resource.
> 	movie openMovieFromURI: aURI. 
> 	"movie play."
> 	movie startMovieQT.
> 	"movie stopMovieQT."
> when you do #startMovieQT, you will hear the movie audio, but drawing has
> not been implemented, so you won't see anything.  At least we're connected
> to the QT API :)
> 
> Sean
> 
> -- 
> View this message in context: http://forum.world.st/Playing-Flash-movies-in-image-tp3167383p3167639.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> 

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================







More information about the Squeak-dev mailing list