public class VideoRecorderAppState extends AbstractAppState
Modifier and Type | Class and Description |
---|---|
static class |
VideoRecorderAppState.IsoTimer |
initialized
Constructor and Description |
---|
VideoRecorderAppState()
Using this constructor the video files will be written sequentially to the user's home directory with
a quality of 0.8 and a framerate of 30fps.
|
VideoRecorderAppState(java.io.File file)
This constructor allows you to specify the output file of the video.
|
VideoRecorderAppState(java.io.File file,
float quality)
This constructor allows you to specify the output file of the video as well as the quality
|
VideoRecorderAppState(java.io.File file,
float quality,
int framerate)
This constructor allows you to specify the output file of the video as well as the quality
|
VideoRecorderAppState(float quality)
Using this constructor the video files will be written sequentially to the user's home directory.
|
VideoRecorderAppState(float quality,
int framerate)
Using this constructor the video files will be written sequentially to the user's home directory.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Called by
AppStateManager when transitioning this
AppState from terminating to detached. |
java.io.File |
getFile() |
float |
getQuality()
Get the quality used to compress the video images.
|
void |
initialize(AppStateManager stateManager,
Application app)
Called by
AppStateManager when transitioning this AppState
from initializing to running.This will happen on the next iteration through the update loop after AppStateManager.attach(com.jme3.app.state.AppState) was called. |
void |
setFile(java.io.File file) |
void |
setQuality(float quality)
Set the video image quality from 0(worst/smallest) to 1(best/largest).
|
getId, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetached, update
public VideoRecorderAppState()
public VideoRecorderAppState(float quality)
quality
- the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)public VideoRecorderAppState(float quality, int framerate)
quality
- the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)framerate
- the frame rate of the resulting video, the application will be locked to this frameratepublic VideoRecorderAppState(java.io.File file)
file
- the video filepublic VideoRecorderAppState(java.io.File file, float quality)
file
- the video filequality
- the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)public VideoRecorderAppState(java.io.File file, float quality, int framerate)
file
- the video filequality
- the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)public java.io.File getFile()
public void setFile(java.io.File file)
public float getQuality()
public void setQuality(float quality)
quality
- the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)public void initialize(AppStateManager stateManager, Application app)
AppState
AppStateManager
when transitioning this AppState
from initializing to running.AppStateManager.attach(com.jme3.app.state.AppState)
was called.
AppStateManager
will call this only from the update loop
inside the rendering thread. This means is it safe to modify the scene
graph from this method.
initialize
in interface AppState
initialize
in class AbstractAppState
stateManager
- The state managerapp
- The applicationpublic void cleanup()
AppState
AppStateManager
when transitioning this
AppState
from terminating to detached. This
method is called the following render pass after the AppState
has
been detached and is always called once and only once for each time
initialize()
is called. Either when the AppState
is detached or when the application terminates (if it terminates normally).cleanup
in interface AppState
cleanup
in class AbstractAppState