com.aurellem.capture.video
Class AbstractVideoRecorder
java.lang.Object
com.aurellem.capture.video.AbstractVideoRecorder
- All Implemented Interfaces:
- VideoRecorder, com.jme3.app.state.AppState, com.jme3.post.SceneProcessor
- Direct Known Subclasses:
- AVIVideoRecorder, FileVideoRecorder, XuggleVideoRecorder
public abstract class AbstractVideoRecorder
- extends java.lang.Object
- implements com.jme3.post.SceneProcessor, VideoRecorder, com.jme3.app.state.AppState
VideoRecorder
copies the frames it receives to video.
To ensure smooth video at a constant framerate, you should set your
application's timer to a new IsoTimer
. This class will
auto-determine the framerate of the video based on the time difference
between the first two frames it receives, although you can manually set
the framerate by calling setFps(newFramerate)
. Be sure to
place this processor *after* any other processors whose effects you want
to be included in the output video. You can attach multiple
VideoProcessor
s to the same ViewPort
.
For example,
someViewPort.addProcessor(new VideoProcessor(file1));
someViewPort.addProcessor(someShadowRenderer);
someViewPort.addProcessor(new VideoProcessor(file2));
will output a video without shadows to file1
and a video
with shadows to file2
- Author:
- Robert McIntyre
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractVideoRecorder
public AbstractVideoRecorder(java.io.File output)
throws java.io.IOException
- Throws:
java.io.IOException
getFps
public double getFps()
setFps
public AbstractVideoRecorder setFps(double fps)
initialize
public void initialize(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort viewPort)
- Specified by:
initialize
in interface com.jme3.post.SceneProcessor
reshape
public void reshape(com.jme3.renderer.ViewPort vp,
int w,
int h)
- Specified by:
reshape
in interface com.jme3.post.SceneProcessor
isInitialized
public boolean isInitialized()
- Specified by:
isInitialized
in interface com.jme3.app.state.AppState
- Specified by:
isInitialized
in interface com.jme3.post.SceneProcessor
preFrame
public void preFrame(float tpf)
- Specified by:
preFrame
in interface com.jme3.post.SceneProcessor
postQueue
public void postQueue(com.jme3.renderer.queue.RenderQueue rq)
- Specified by:
postQueue
in interface com.jme3.post.SceneProcessor
postFrame
public void postFrame(com.jme3.texture.FrameBuffer out)
- Specified by:
postFrame
in interface com.jme3.post.SceneProcessor
cleanup
public void cleanup()
- Specified by:
cleanup
in interface com.jme3.app.state.AppState
- Specified by:
cleanup
in interface com.jme3.post.SceneProcessor
pause
public void pause()
- Description copied from interface:
VideoRecorder
- Stop recording temporarily. The recording can be started again
with start()
- Specified by:
pause
in interface VideoRecorder
start
public void start()
- Description copied from interface:
VideoRecorder
- Start the recording.
- Specified by:
start
in interface VideoRecorder
initialize
public void initialize(com.jme3.app.state.AppStateManager stateManager,
com.jme3.app.Application app)
- Specified by:
initialize
in interface com.jme3.app.state.AppState
setEnabled
public void setEnabled(boolean active)
- Specified by:
setEnabled
in interface com.jme3.app.state.AppState
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface com.jme3.app.state.AppState
stateAttached
public void stateAttached(com.jme3.app.state.AppStateManager stateManager)
- Specified by:
stateAttached
in interface com.jme3.app.state.AppState
stateDetached
public void stateDetached(com.jme3.app.state.AppStateManager stateManager)
- Specified by:
stateDetached
in interface com.jme3.app.state.AppState
update
public void update(float tpf)
- Specified by:
update
in interface com.jme3.app.state.AppState
render
public void render(com.jme3.renderer.RenderManager rm)
- Specified by:
render
in interface com.jme3.app.state.AppState
postRender
public void postRender()
- Specified by:
postRender
in interface com.jme3.app.state.AppState