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.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.
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 -
Field Summary
Fields inherited from class com.jme3.app.state.AbstractAppState
initialized -
Constructor Summary
ConstructorsConstructorDescriptionUsing 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(File file) This constructor allows you to specify the output file of the video.VideoRecorderAppState(File file, float quality) This constructor allows you to specify the output file of the video as well as the qualityVideoRecorderAppState(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
Modifier and TypeMethodDescriptionvoidcleanup()getFile()floatGet the quality used to compress the video images.voidinitialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app) voidvoidsetQuality(float quality) Set the video image quality from 0(worst/smallest) to 1(best/largest).Methods inherited from class com.jme3.app.state.AbstractAppState
getId, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetached, update
-
Constructor Details
-
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
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
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
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 Details
-
getFile
-
setFile
-
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
-