view src/com/aurellem/capture/examples/HelloVideoRecording.java @ 70:a67aef438383

minor fix.
author Robert McIntyre <rlm@mit.edu>
date Wed, 29 May 2013 17:31:16 -0400
parents afc437f637bd
children
line wrap: on
line source
1 package com.aurellem.capture.examples;
3 import java.io.File;
4 import java.io.IOException;
6 import jme3test.helloworld.HelloLoop;
8 import com.aurellem.capture.Capture;
9 import com.aurellem.capture.IsoTimer;
10 import com.jme3.app.Application;
12 /** Recording Video from your Application is simple. If all you want
13 * to do is record Video, then follow the following steps.
14 *
15 * 1.) Set the Application's timer to an IsoTimer. The framerate of
16 * the IsoTimer will determine the framerate of the resulting video.
17 *
18 *
19 *
20 * 2.) Call Capture.captureVideo(yourApplication, target-file) before
21 * calling yourApplication.start()
22 *
23 * That's it! If you have any comments/problems, please PM me on the
24 * jMonkeyEngine forms. My username is bortreb.
25 *
26 * @author Robert McIntyre
27 */
28 public class HelloVideoRecording {
30 public static void main(String[] ignore) throws IOException {
31 Application app = new HelloLoop();
32 File video = File.createTempFile("JME-simple-video", ".avi");
33 app.setTimer(new IsoTimer(60));
34 Capture.captureVideo(app, video);
35 app.start();
36 System.out.println(video.getCanonicalPath());
37 }
38 }