Class XuggleVideoRecorder
java.lang.Object
org.opensourcephysics.media.core.ScratchVideoRecorder
org.opensourcephysics.media.xuggle.XuggleVideoRecorder
- All Implemented Interfaces:
VideoRecorder
A class to record videos using the Xuggle video engine.
-
Field Summary
Fields inherited from class org.opensourcephysics.media.core.ScratchVideoRecorder
baseDir, canRecord, chooser, chooserField, chosenExtension, dim, ext, frameCount, frameDuration, frameImage, hasContent, ignoreChooser, isSaved, saveChanges, saveFile, scratchFile, scratchName, scratchNumber, suggestedFileName, tempDirectory, tempFileBasePath, tempFilePrefix, tempFiles, tempFileType, videoType -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a XuggleVideoRecorder object. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanAppends a frame to the current video by saving the image in a tempFile.protected voidfinalize()Called by the garbage collector when this recorder is no longer in use.getCodec()static voidgetSupportedCodecs(String name) Given the short name of a container, prints out information about it, including which codecs Xuggler can write (mux) into that container.voidreset()Discards the current video and resets the recorder to a ready state.protected voidSaves the video to the current scratchFile.protected booleanStarts the video recording process.Methods inherited from class org.opensourcephysics.media.core.ScratchVideoRecorder
addFrame, createScratch, createVideo, createVideo, createVideo, deleteFiles, deleteTempFiles, getFileName, getFileToBeSaved, getScratchExtension, getVideo, getVideoType, saveVideo, saveVideo, saveVideoAs, selectFile, setChooserExtension, setFileName, setFrameDuration, setSize, suggestFileName
-
Constructor Details
-
XuggleVideoRecorder
Constructs a XuggleVideoRecorder object.- Parameters:
type- the video type
-
-
Method Details
-
reset
public void reset()Discards the current video and resets the recorder to a ready state.- Specified by:
resetin interfaceVideoRecorder- Overrides:
resetin classScratchVideoRecorder
-
finalize
protected void finalize()Called by the garbage collector when this recorder is no longer in use.- Overrides:
finalizein classScratchVideoRecorder
-
append
Appends a frame to the current video by saving the image in a tempFile.- Specified by:
appendin classScratchVideoRecorder- Parameters:
image- the image to append- Returns:
- true if image successfully saved
-
saveScratch
Saves the video to the current scratchFile.- Specified by:
saveScratchin classScratchVideoRecorder- Throws:
IOException
-
startRecording
protected boolean startRecording()Starts the video recording process.- Specified by:
startRecordingin classScratchVideoRecorder- Returns:
- true if video recording successfully started
-
getSupportedCodecs
Given the short name of a container, prints out information about it, including which codecs Xuggler can write (mux) into that container.- Parameters:
name- the short name of the format (e.g. "flv")
-
getCodec
-