public interface VideoRecorder
| Modifier and Type | Method and Description |
|---|---|
void |
addFrame(java.awt.Image image)
Adds a video frame to the current video.
|
void |
createVideo()
Creates a new video to which frames can be added.
|
void |
createVideo(java.lang.String fileName)
Creates a new video with the specified file name.
|
void |
createVideo(java.lang.String fileName,
int width,
int height)
Creates a new video with the specified file name and dimensions.
|
java.lang.String |
getFileName()
Gets the current file name.
|
Video |
getVideo()
Gets the current video.
|
java.lang.String |
saveVideo()
Saves the video to the current file.
|
java.lang.String |
saveVideo(java.lang.String fileName)
Saves the video to the specified file.
|
java.lang.String |
saveVideoAs()
Saves the video to a file selected with a chooser.
|
void |
setFileName(java.lang.String path)
Sets the file name.
|
void |
setFrameDuration(double millis)
Sets the time duration per frame for subsequent added frames.
|
void createVideo()
throws java.io.IOException
java.io.IOExceptionvoid createVideo(java.lang.String fileName)
throws java.io.IOException
fileName - name of the file to which the video will be writtenjava.io.IOExceptionvoid createVideo(java.lang.String fileName,
int width,
int height)
throws java.io.IOException
fileName - name of the video filewidth - width of the new videoheight - height of the new videojava.io.IOExceptionvoid setFrameDuration(double millis)
millis - the duration per frame in millisecondsvoid addFrame(java.awt.Image image)
throws java.io.IOException
image - the image to be drawn on the video frame.java.io.IOExceptionVideo getVideo() throws java.io.IOException
java.io.IOExceptionjava.lang.String saveVideo()
throws java.io.IOException
java.io.IOExceptionjava.lang.String saveVideo(java.lang.String fileName)
throws java.io.IOException
fileName - the file name to be savedjava.io.IOExceptionjava.lang.String saveVideoAs()
throws java.io.IOException
java.io.IOExceptionjava.lang.String getFileName()
void setFileName(java.lang.String path)
path - the file name