com.jme3.app.state
Class VideoRecorderAppState

java.lang.Object
  extended by com.jme3.app.state.AbstractAppState
      extended by com.jme3.app.state.VideoRecorderAppState
All Implemented Interfaces:
AppState

public class VideoRecorderAppState
extends AbstractAppState

A Video recording AppState that records the screen output into an AVI file with M-JPEG content. The file should be playable on any OS in any video player.
The video recording starts when the state is attached and stops when it is detached or the application is quit. You can set the fileName of the file to be written when the state is detached, else the old file will be overwritten. If you specify no file the AppState will attempt to write a file into the user home directory, made unique by a timestamp.


Nested Class Summary
static class VideoRecorderAppState.IsoTimer
           
 
Field Summary
 
Fields inherited from class com.jme3.app.state.AbstractAppState
initialized
 
Constructor Summary
VideoRecorderAppState()
          Using this constructor the video files will be written sequentially to the user's home directory with a quality of 0.8
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(float quality)
          Using this constructor the video files will be written sequentially to the user's home directory.
 
Method Summary
 void cleanup()
          Cleanup the game state.
 java.io.File getFile()
           
 float getQuality()
          Get the quality used to compress the video images.
 void initialize(AppStateManager stateManager, Application app)
          Called to initialize the AppState.
 void setFile(java.io.File file)
           
 void setQuality(float quality)
          Set the video image quality from 0(worst/smallest) to 1(best/largest).
 
Methods inherited from class com.jme3.app.state.AbstractAppState
isEnabled, isInitialized, postRender, render, setEnabled, stateAttached, stateDetached, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoRecorderAppState

public VideoRecorderAppState()
Using this constructor the video files will be written sequentially to the user's home directory with a quality of 0.8


VideoRecorderAppState

public VideoRecorderAppState(float quality)
Using this constructor the video files will be written sequentially to the user's home directory.

Parameters:
quality - the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)

VideoRecorderAppState

public VideoRecorderAppState(java.io.File file)
This constructor allows you to specify the output file of the video. The quality is set to 0.8

Parameters:
file - the video file

VideoRecorderAppState

public VideoRecorderAppState(java.io.File file,
                             float quality)
This constructor allows you to specify the output file of the video as well as the quality

Parameters:
file - the video file
quality - the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)
Method Detail

getFile

public java.io.File getFile()

setFile

public void setFile(java.io.File file)

getQuality

public float getQuality()
Get the quality used to compress the video images.

Returns:
the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)

setQuality

public void setQuality(float quality)
Set the video image quality from 0(worst/smallest) to 1(best/largest).

Parameters:
quality - the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)

initialize

public void initialize(AppStateManager stateManager,
                       Application app)
Description copied from interface: AppState
Called to initialize the AppState.

Specified by:
initialize in interface AppState
Overrides:
initialize in class AbstractAppState
Parameters:
stateManager - The state manager

cleanup

public void cleanup()
Description copied from interface: AppState
Cleanup the game state.

Specified by:
cleanup in interface AppState
Overrides:
cleanup in class AbstractAppState