Package com.jme3.app.state
Class VideoRecorderAppState
- java.lang.Object
-
- com.jme3.app.state.AbstractAppState
-
- com.jme3.app.state.VideoRecorderAppState
-
- All Implemented Interfaces:
com.jme3.app.state.AppState
public class VideoRecorderAppState extends com.jme3.app.state.AbstractAppStateA 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.- Author:
- normenhansen, Robert McIntyre, entrusC
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVideoRecorderAppState.IsoTimer
-
Constructor Summary
Constructors Constructor 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(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.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 qualityVideoRecorderAppState(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()java.io.FilegetFile()floatgetQuality()Get the quality used to compress the video images.voidinitialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app)voidsetFile(java.io.File file)voidsetQuality(float quality)Set the video image quality from 0(worst/smallest) to 1(best/largest).
-
-
-
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 and a framerate of 30fps.
-
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(float quality, int framerate)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)framerate- the frame rate of the resulting video, the application will be locked to this framerate
-
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 and framerate to 30 fps.- 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 filequality- the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)
-
VideoRecorderAppState
public 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.- Parameters:
file- the video filequality- 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 framerate
-
-
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(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app)- Specified by:
initializein interfacecom.jme3.app.state.AppState- Overrides:
initializein classcom.jme3.app.state.AbstractAppState
-
cleanup
public void cleanup()
- Specified by:
cleanupin interfacecom.jme3.app.state.AppState- Overrides:
cleanupin classcom.jme3.app.state.AbstractAppState
-
-