Class MovieMaker
At this point you can start feeding the MovieMaker frames with add(image). When you are finished, call stop() and the MovieMaker will flush out the remaining movie frames to disk and create the file. Throw your MovieMaker away at this point.
MovieMaker, like MovieEncoder, relies on the Java Media Framework (JMF) to do its magic. If JMF doesn't exist, MovieMaker doesn't produce an error; instead, it will produce a dialog box informing the user of his mistake. MovieMaker is coded in an odd way: no actual direct references are made to MovieEncoder. This is in case the JVM is too smart and tries to load MovieEncoder (and the JMF) immediately rather than lazily as it gets referenced by MovieMaker.
Note: Sun's JMF spawns threads in the background which it never cleans up. Thus if you use this class, you'll need to call System.exit(0) to quit your program rather than just dropping out of main().
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(BufferedImage image) Add an image to the movie stream.boolean
start
(BufferedImage typicalImage) Create a dialog box allowing the user to specify where to save the file, and in what format and frame rate (default = 10 frames per second), and set up the movie encoding process ready to go, using typicalImage as an example image (for size purposes).boolean
start
(BufferedImage typicalImage, float fps) Create a dialog box allowing the user to specify where to save the file, and in what format and frame rate (default provided), and set up the movie encoding process ready to go, using typicalImage as an example image (for size purposes).boolean
stop()
End the movie stream, finish up writing to disk, and clean up.
-
Constructor Details
-
MovieMaker
-
-
Method Details
-
start
Create a dialog box allowing the user to specify where to save the file, and in what format and frame rate (default = 10 frames per second), and set up the movie encoding process ready to go, using typicalImage as an example image (for size purposes). Return false if failed to start. -
start
Create a dialog box allowing the user to specify where to save the file, and in what format and frame rate (default provided), and set up the movie encoding process ready to go, using typicalImage as an example image (for size purposes). Return false if failed to start. -
add
Add an image to the movie stream. Do this only after starting. -
stop
public boolean stop()End the movie stream, finish up writing to disk, and clean up.
-