org.opensourcephysics.media.xuggle
Class XuggleVideoRecorder

java.lang.Object
  extended by org.opensourcephysics.media.core.ScratchVideoRecorder
      extended by org.opensourcephysics.media.xuggle.XuggleVideoRecorder
All Implemented Interfaces:
VideoRecorder

public class XuggleVideoRecorder
extends ScratchVideoRecorder

A class to record videos using the Xuggle video engine.


Field Summary
 
Fields inherited from class org.opensourcephysics.media.core.ScratchVideoRecorder
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
XuggleVideoRecorder(XuggleVideoType type)
          Constructs a XuggleVideoRecorder object.
 
Method Summary
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.
static void getSupportedCodecs(java.lang.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 saveScratch()
          Saves the video to the current scratchFile.
protected  boolean startRecording()
          Starts the video recording process.
 
Methods inherited from class org.opensourcephysics.media.core.ScratchVideoRecorder
addFrame, createScratch, createVideo, createVideo, deleteTempFiles, getFileName, getFileToBeSaved, getScratchExtension, getVideo, saveVideo, saveVideo, saveVideoAs, selectFile, setFileName, setFrameDuration, setSize, suggestFileName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XuggleVideoRecorder

public XuggleVideoRecorder(XuggleVideoType type)
Constructs a XuggleVideoRecorder object.

Parameters:
type - the video type
Method Detail

reset

public void reset()
Discards the current video and resets the recorder to a ready state.

Specified by:
reset in interface VideoRecorder
Overrides:
reset in class ScratchVideoRecorder

finalize

protected void finalize()
Called by the garbage collector when this recorder is no longer in use.

Overrides:
finalize in class ScratchVideoRecorder

append

protected boolean append(java.awt.Image image)
Appends a frame to the current video by saving the image in a tempFile.

Specified by:
append in class ScratchVideoRecorder
Parameters:
image - the image to append
Returns:
true if image successfully saved

saveScratch

protected void saveScratch()
                    throws java.io.IOException
Saves the video to the current scratchFile.

Specified by:
saveScratch in class ScratchVideoRecorder
Throws:
java.io.IOException

startRecording

protected boolean startRecording()
Starts the video recording process.

Specified by:
startRecording in class ScratchVideoRecorder
Returns:
true if video recording successfully started

getSupportedCodecs

public static void getSupportedCodecs(java.lang.String name)
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")