public class MovieMaker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MovieMaker.Method
Describes the method used to make movies
|
static class |
MovieMaker.MethodInfo
Information about a particular movie making method.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANIMATED_GIF_METHOD |
static java.lang.String |
AVCONV_METHOD |
static java.lang.String |
FFMPEG_METHOD |
static java.lang.String |
INTERNAL_METHOD |
static java.lang.String |
MENCODER_METHOD |
static java.lang.String |
MENCODER_OSX_METHOD |
static int |
OFFSCREEN_MODE |
static int |
ONSCREEN_MODE |
Constructor and Description |
---|
MovieMaker(GLViewer viewer) |
Modifier and Type | Method and Description |
---|---|
void |
addMethod(MovieMaker.Method method,
java.lang.String methodCmd,
java.lang.String imgFmt) |
void |
clean()
Remove the image files created in the specified folder after a movie
has been made.
|
int |
close()
Writes movie information file.
|
void |
closeDialog()
Hides MovieMakerDialog.
|
void |
forceGrab()
Grabs rectangle and writes to disk right now, forcing a rerender
(as opposed to waiting for next render cycle).
|
java.lang.String |
getAudioFileName()
Returns the path name of the current audio file.
|
double |
getAudioSampleRate()
Returns the audio sampling rate in Hz.
|
java.awt.Rectangle |
getCaptureArea()
Returns the area defining the movie region.
|
static MovieMaker.MethodInfo |
getDefaultMethodInfo(MovieMaker.Method method) |
java.lang.String |
getDefaultMovieFolderPath()
Returns the path name of the default working folder
|
java.lang.String |
getFormat()
/**
Returns the output format.
|
java.io.File |
getFrameFile(int n)
Returns the file of the frame specified by int n.
|
java.lang.String |
getFrameFileName(int n)
Returns the absolute file path of the frame specified by int n.
|
double |
getFrameRate()
Returns the current frame rate in Hz.
|
int |
getGrabMode() |
MovieMaker.Method |
getMethod()
Returns current movie making method.
|
MovieMaker.Method |
getMethod(java.lang.String methodName)
Returns the method corresponding to a specific name, or
null if there is no such method. |
MovieMaker.MethodInfo |
getMethodInfo(MovieMaker.Method method)
Returns information for a specific method
|
java.io.File |
getMovieFolder()
Returns the working folder in which movies are made.
|
java.lang.String |
getMovieFolderPath()
Returns the path name of the working folder
|
double |
getRequestedStopTime() |
double |
getSpeed()
Returns the video speed.
|
void |
grab()
Grabs rectangle and writes to disk.
|
void |
grab(java.lang.String filename)
Grabs rectangle and writes to disk.
|
void |
grabScreenShot(java.lang.String filename) |
boolean |
isAlwaysOnTop() |
boolean |
isAudioNormalized()
Returns true if audio must be normalized.
|
boolean |
isGrabbing()
Returns true if currently grabbing frames.
|
boolean |
isRenderingAudioToFile()
Returns true if currently rendering audio to a file.
|
boolean |
isRenderingAudioToText()
Returns true if currently rendering audio to text.
|
boolean |
isStopRequestPending()
Returns true if a stop has been requested.
|
void |
print(java.lang.String msg)
Print to the messages text area
|
void |
println(java.lang.String msg)
Print to the messages text area, followed by a newline
|
boolean |
render(java.lang.String fn)
Renders captured data to a movie with the specified file name.
|
void |
requestStop() |
void |
resetFrameCounter() |
void |
saveFirstFrame(java.lang.String fn)
Saves the first image file in the same folder as the movie.
|
void |
setAlwaysOnTop(boolean set) |
void |
setAntiAliasingSamples(int s) |
void |
setAudioFileName(java.lang.String fileName)
Sets the path name for the audio save file.
|
void |
setAudioNormalized(boolean normalize)
Sets whether audio must be normalized.
|
void |
setAudioSampleRate(double rate)
Sets the audio sampling rate in Hz.
|
void |
setCaptureArea(java.awt.Rectangle rect,
java.awt.Dimension grabResize)
Sets the rectangle defining the movie region and what dimensions
to capture the movie to; resizeDim should only be set if rendering
from a GL canvas, otherwise null.
|
void |
setFormat(java.lang.String fmt)
Sets the output format.
|
void |
setFrameRate(double rate)
Sets the current frame rate in Hz.
|
void |
setGrabbing(boolean grabbing)
Sets whether the MovieMaker is currently grabbing frames.
|
void |
setMethod(MovieMaker.Method method)
Sets the current movie making method.
|
void |
setMethod(MovieMaker.Method method,
java.lang.String methodCmd,
java.lang.String imgFmt)
Sets movie making method.
|
void |
setMethodInfo(MovieMaker.Method method,
MovieMaker.MethodInfo info)
Returns information for a specific method
|
void |
setMovieFolder(java.io.File dir)
Sets the working folder in which movies are made.
|
void |
setRenderingAudioToFile(boolean rendering)
Sets whether the MovieMaker is currently rendering audio to a file.
|
void |
setRenderingAudioToText(boolean rendering)
Sets whether the MovieMaker is currently rendering audio to text.
|
void |
setSpeed(double s)
Sets the video speed.
|
void |
setViewer(GLViewer viewer) |
void |
showDialog(java.awt.Window win)
Displays MovieMakerDialog to the right of the specified window.
|
void |
updateDialogWidgets()
Updates widgets in the dialog to reflect changes in underlying
properties.
|
void |
updateForNewRootModel(java.lang.String modelName,
RootModel root)
Update MovieMakerDialog for new model name and audio capabilities.
|
public static final java.lang.String INTERNAL_METHOD
public static final java.lang.String MENCODER_METHOD
public static final java.lang.String MENCODER_OSX_METHOD
public static final java.lang.String FFMPEG_METHOD
public static final java.lang.String ANIMATED_GIF_METHOD
public static final java.lang.String AVCONV_METHOD
public static final int OFFSCREEN_MODE
public static final int ONSCREEN_MODE
public MovieMaker(GLViewer viewer) throws java.lang.Exception
java.lang.Exception
public static MovieMaker.MethodInfo getDefaultMethodInfo(MovieMaker.Method method)
public void setViewer(GLViewer viewer)
public MovieMaker.MethodInfo getMethodInfo(MovieMaker.Method method)
public void setMethodInfo(MovieMaker.Method method, MovieMaker.MethodInfo info)
public void setMethod(MovieMaker.Method method, java.lang.String methodCmd, java.lang.String imgFmt)
public void addMethod(MovieMaker.Method method, java.lang.String methodCmd, java.lang.String imgFmt)
public MovieMaker.Method getMethod()
public MovieMaker.Method getMethod(java.lang.String methodName)
null
if there is no such method.public void setMethod(MovieMaker.Method method)
public java.lang.String getFormat()
public void setFormat(java.lang.String fmt)
public java.lang.String getFrameFileName(int n)
public java.io.File getFrameFile(int n)
public void resetFrameCounter()
public void grab() throws java.lang.Exception
java.lang.Exception
public void forceGrab() throws java.lang.Exception
java.lang.Exception
public void grabScreenShot(java.lang.String filename)
public void grab(java.lang.String filename) throws java.lang.Exception
java.lang.Exception
public int close() throws java.lang.Exception
java.lang.Exception
public boolean render(java.lang.String fn) throws java.lang.Exception
java.lang.Exception
public void saveFirstFrame(java.lang.String fn)
public void clean()
public double getAudioSampleRate()
public void setAudioSampleRate(double rate)
public boolean isAudioNormalized()
public void setAudioNormalized(boolean normalize)
public double getSpeed()
public void setSpeed(double s)
public boolean isGrabbing()
public void setGrabbing(boolean grabbing)
public boolean isStopRequestPending()
public boolean isRenderingAudioToFile()
public void setRenderingAudioToFile(boolean rendering)
public boolean isRenderingAudioToText()
public void setRenderingAudioToText(boolean rendering)
public java.awt.Rectangle getCaptureArea()
public void setCaptureArea(java.awt.Rectangle rect, java.awt.Dimension grabResize)
public void setAntiAliasingSamples(int s)
public int getGrabMode()
public java.lang.String getAudioFileName()
public void setAudioFileName(java.lang.String fileName)
public double getFrameRate()
public void setFrameRate(double rate)
public void showDialog(java.awt.Window win)
public void closeDialog()
public void updateForNewRootModel(java.lang.String modelName, RootModel root)
public boolean isAlwaysOnTop()
public void setAlwaysOnTop(boolean set)
public void println(java.lang.String msg)
public void print(java.lang.String msg)
public java.io.File getMovieFolder()
public java.lang.String getMovieFolderPath()
public java.lang.String getDefaultMovieFolderPath()
public void setMovieFolder(java.io.File dir)
public void updateDialogWidgets()
public double getRequestedStopTime()
public void requestStop()