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 boolean
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.getCodec()
static void
getSupportedCodecs
(String name) Given the short name of a container, prints out information about it, including which codecs Xuggler can write (mux) into that container.void
reset()
Discards the current video and resets the recorder to a ready state.protected void
Saves the video to the current scratchFile.protected boolean
Starts 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:
reset
in interfaceVideoRecorder
- Overrides:
reset
in classScratchVideoRecorder
-
finalize
protected void finalize()Called by the garbage collector when this recorder is no longer in use.- Overrides:
finalize
in classScratchVideoRecorder
-
append
Appends a frame to the current video by saving the image in a tempFile.- Specified by:
append
in classScratchVideoRecorder
- Parameters:
image
- the image to append- Returns:
- true if image successfully saved
-
saveScratch
Saves the video to the current scratchFile.- Specified by:
saveScratch
in classScratchVideoRecorder
- Throws:
IOException
-
startRecording
protected boolean startRecording()Starts the video recording process.- Specified by:
startRecording
in 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
-