- set NanoTimer when detaching VideoRecorderAppState

- make File in VideoRecorderAppState accessible

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8708 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 0420b4121e
commit f6e3a3eab2
  1. 10
      engine/src/desktop/com/jme3/app/state/VideoRecorderAppState.java

@ -6,6 +6,7 @@ import com.jme3.renderer.Camera;
import com.jme3.renderer.RenderManager; import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort; import com.jme3.renderer.ViewPort;
import com.jme3.renderer.queue.RenderQueue; import com.jme3.renderer.queue.RenderQueue;
import com.jme3.system.NanoTimer;
import com.jme3.texture.FrameBuffer; import com.jme3.texture.FrameBuffer;
import com.jme3.util.BufferUtils; import com.jme3.util.BufferUtils;
import com.jme3.util.Screenshots; import com.jme3.util.Screenshots;
@ -32,6 +33,14 @@ public class VideoRecorderAppState extends AbstractAppState {
this.file = file; this.file = file;
} }
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
@Override @Override
public void initialize(AppStateManager stateManager, Application app) { public void initialize(AppStateManager stateManager, Application app) {
super.initialize(stateManager, app); super.initialize(stateManager, app);
@ -103,6 +112,7 @@ public class VideoRecorderAppState extends AbstractAppState {
} }
public void cleanup() { public void cleanup() {
app.setTimer(new NanoTimer());
try { try {
writer.finishAVI(); writer.finishAVI();
} catch (Exception ex) { } catch (Exception ex) {

Loading…
Cancel
Save