VideoRecorderpublic class ImageVideoRecorder extends ScratchVideoRecorder
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
frameCount |
canRecord, chooser, chooserField, chosenExtension, dim, ext, frameDuration, frameImage, hasContent, ignoreChooser, isSaved, saveChanges, saveFile, scratchFile, scratchName, scratchNumber, suggestedFileName, tempDirectory, tempFilePrefix, tempFiles, videoType| Constructor | Description |
|---|---|
ImageVideoRecorder() |
Constructs a default ImageVideoRecorder object.
|
ImageVideoRecorder(ImageVideoType type) |
Constructs a ImageVideoRecorder object for a specific image type.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
append(java.awt.Image image) |
Appends a frame to the current video by saving the image in a tempFile.
|
protected void |
finalize() |
Called by the garbage collector when this recorder is no longer in use.
|
protected static int |
getAppendedNumber(java.lang.String path) |
|
protected static java.lang.String |
getBase(java.lang.String path) |
|
protected static java.lang.String[] |
getFileNames(java.lang.String fileName,
int length) |
|
protected java.io.File |
getFileToBeSaved(java.io.File file) |
Return the file that will be saved if the specified file is selected.
|
Video |
getVideo() |
Gets the video.
|
void |
reset() |
Discards the current video and resets the recorder to a ready state.
|
protected static java.lang.String[] |
saveImages(java.lang.String fileName,
java.awt.image.BufferedImage[] images) |
Saves images to a numbered sequence of jpg files.
|
protected void |
saveScratch() |
Required by ScratchVideoRecorder, but unused.
|
java.lang.String |
saveVideo(java.lang.String fileName) |
Saves all video images to a numbered sequence of files.
|
void |
setExpectedFrameCount(int n) |
Sets the expected frame count.
|
protected boolean |
startRecording() |
Starts the video recording process.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFrame, createScratch, createVideo, createVideo, deleteTempFiles, getFileName, getScratchExtension, saveVideo, saveVideoAs, selectFile, setFileName, setFrameDuration, setSize, suggestFileNamepublic ImageVideoRecorder()
public ImageVideoRecorder(ImageVideoType type)
type - the image typepublic Video getVideo() throws java.io.IOException
getVideo in interface VideoRecordergetVideo in class ScratchVideoRecorderjava.io.IOExceptionpublic java.lang.String saveVideo(java.lang.String fileName)
throws java.io.IOException
saveVideo in interface VideoRecordersaveVideo in class ScratchVideoRecorderfileName - the file name basis for imagesjava.io.IOExceptionpublic void setExpectedFrameCount(int n)
n - the expected frame countpublic void reset()
reset in interface VideoRecorderreset in class ScratchVideoRecorderprotected void finalize()
finalize in class ScratchVideoRecorderprotected void saveScratch()
throws java.io.IOException
saveScratch in class ScratchVideoRecorderjava.io.IOExceptionprotected boolean startRecording()
startRecording in class ScratchVideoRecorderprotected boolean append(java.awt.Image image)
append in class ScratchVideoRecorderimage - the image to appendprotected java.io.File getFileToBeSaved(java.io.File file)
getFileToBeSaved in class ScratchVideoRecorderfile - the file selected with the chooserprotected static java.lang.String[] saveImages(java.lang.String fileName,
java.awt.image.BufferedImage[] images)
throws java.io.IOException
fileName - the file name basis for imagesimages - the images to savejava.io.IOExceptionprotected static java.lang.String[] getFileNames(java.lang.String fileName,
int length)
protected static java.lang.String getBase(java.lang.String path)
protected static int getAppendedNumber(java.lang.String path)