Included on the Squeak: Object-oriented design with multimedia applications CD with the permission of Jim Benson

You will need Squeak 2.8 to use these the QuickTime to Squeak connection. IT IS ONLY AVAILABLE FOR WINDOWS AND MACINTOSH.

Jim Benson's Home Page

QuickTime for Squeak

QuickTime interface to Squeak by Jim Benson.

What's all this then?

Overview:

The QuickTime for Squeak changeset provides the source code to a simple interface to Apple's QuickTime toolbox through Squeak's Foreign Function Inteferface (FFI). This capability provides access to a rich variety of media types, such as QuickTime movies, AVI movies, MP3, MIDI and JPEG. The changeset consists of two basic components, raw QuickTime movie/graphic toolbox calls and a Morphic movie controller interface. The movie controller interface closely simulates the QuickTime movie controller, as well as provides an optional time counter.

In this version, QuickTime writes directly to display memory. The movie controller bounds the QuickTime movie's clipping region to that of the visible portion of the Squeak SystemWindow that it is being displayed in. This allows other Squeak windows and morphs to overlay a movie window, without fear of being overwritten.

Another semi interesting point is that the movie controller images are stored in an image dictionary so that the *really* motivated individual can provide new skins ( also called looks ) to the movie controller.

Currently, this changeset only plays movies locally (no streaming support as of yet). Also, there is no support provided for QTVR movies.

Installation:

All right then. Let's get started:

The changeset requires Squeak version 2.8. You need to have QuickTime installed on your machine. This is available at www.apple.com/quicktime/download . You should also gather up some QuickTime media to play. If you have some, great. Otherwise:

Here's a relatively small file from http://www.cs.berkeley.edu/~debevec/Campanile/ to test with: 'Over the top' (1.6M, this movie has no sound). Debevec's work is pretty amazing, and this small sample shows why. If you are using Internet Explorer, you can save the movie by right clicking with 'Save Target As'.

Another source is where Apple keeps movie trailers. In the past, I have viewed movies using the QuickTime browser plugin and just ripped them out of the file cache when they are done playing. In general, these are very good quality clips and scale well.

Note: Squeak 2.9a test pilots will also need 2.9fixes.cs . File this in after the QuickTime changeset.

For Microsoft Windows:

Download the following 2 files and save them in your Squeak image directory.

The Squeak changeset: QTWindow.cs.gz (28K) Version 0.7 alpha 9/24/00

Then grab the QuickTime DLL qtmlclient.zip (56K).

Unzip the files.

Start the Squeak image and enter Morphic.

FileIn the decompressed change set, QTWindow.cs. You should be ready to go at this point. Go to Playing Movies.

Updated versions of qtmlclient.dll may be avaible at http://developer.apple.com/sdk/ under "QuickTime Windows SDK" ( Version 4.1.2 currently ). This is Apple's QuickTime library interface DLL.

For Macintosh:

Before you begin, you need to have QuickTime installed on your machine. Then, download the following file and save it in your Squeak image directory.

The Squeak changeset: QTMac.cs (30K) Version 0.7 alpha 9/24/00.

The file is compressed in Stuff-it form. Unstuff the file.

Start the Squeak image and enter Morphic.

FileIn the changeset QTMac.cs. You should be ready to go at this point.

Playing Movies

You are ready to run the movie player. The interesting bit is:

QuickTimeMoviePlayer getAndOpen

which allows you to select a movie to play from a dialog box.

an alternative is:

QuickTimeMoviePlayer openMovieFile: 'filename'.

where filename is a string representing the name of the file that you want to play. ( It is based off of the current working directory of the native operating system, so it is best to include the complete path name of the file to this message ).

 

The aftermath

Read about the version information here.

Read about reported bugs and anomalies here.

Read about installation troubleshooting here.

The server that I am using is a little brain dead. If something untowards happens, it's probably because the files are messed up. You should be able to read in the changeset into a virgin 2.8 image without any problems. If there is a problem, the file didn't download correctly.

Apple's QuickTime toolbox documentation can be found at http://developer.apple.com/techpubs/quicktime/ .

Good luck, have fun, and make a lot of noise. Feel free to send me any comments.

I've copyrighted this code, but what that really means to me is that if you're intending to make money with this code, contact me. I guarantee I can help make it better ( for a small processing fee ;-). If it's for your own personal use, go nuts, have fun, and tell me about any cool stuff that you build on top of it.

 


Jim Benson
jb@speed.net

Last revised: September 24, 2000.