Copyright (c) 2002 - 2003, Junzo Sato. All rights reserved.
Jul 18th 2003
Jun 10th 2002
QuickTime for Java is available from the Apple computer's web site: http://www.apple.com/.
In this notebook, java2 (ver 1.4.1_01) and QuickTime for Java 6.0 is used.
Open QTSession
Create a ToneDescription of an instrument in General MIDI. The piano (#1) is chosen here.
NoteRequest and NoteChannel are prepared.
The function PlayNote[ ] is defined.
Objects are released.
QTSession‚ð•Â‚¶‚é
A movie specified by the URL is played using QTPlayer.
MovieController controls movie frames.
[Windows] c:\quicktime-for-java-sdk\media\jumps.mov
[MacOS X] /quicktime-for-java-sdk/media/jumps.mov
Rewind to the beginning
Get time scale
Get total seconds
Calculate current second of the frame. If the beginning, the time is 0.
Forward the frames.
Now the current second is increased.
Play movie with the rate 1.0.
If the rate is set to 0.0 in the middle of the play, the movie is stopped.
Go to the end of the movie.
Get the current time information of a frame.
This information is set to the captureThis for later use.
Objects are released.
Close QTSession
Using the QTImageProducer, a frame of the movis is derived as a JavaImage.
Get Movie and MoviePlayer by opening the file.
Get image size of the movie.
Get time information
Specify the frame to be captured as a JavaImage. The captureThis was set by the previous example in this notebook.
Get the frame as the JavaImage
Show JavaImage on the MathCanvas.
If the user is using Java Photo Editor which is developed by the author, and Digital Image Processing package,
the captured JavaImage is ready to use for digital image processing operations.
Objects are released.
Close QTSession
Converted by Mathematica (July 18, 2003)