comparison src/com/aurellem/capture/examples/HelloVideoRecording.java @ 56:afc437f637bd

improved formating
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Dec 2011 19:25:27 -0600
parents 8a091a5f48fa
children
comparison
equal deleted inserted replaced
55:b05f629fc296 56:afc437f637bd
7 7
8 import com.aurellem.capture.Capture; 8 import com.aurellem.capture.Capture;
9 import com.aurellem.capture.IsoTimer; 9 import com.aurellem.capture.IsoTimer;
10 import com.jme3.app.Application; 10 import com.jme3.app.Application;
11 11
12 /** Recording Video from your Application is simple. If all you 12 /** Recording Video from your Application is simple. If all you want
13 * want to do is record Video, then follow the following steps. 13 * to do is record Video, then follow the following steps.
14 * 14 *
15 * 1.) Set the Application's timer to an IsoTimer. The framerate of 15 * 1.) Set the Application's timer to an IsoTimer. The framerate of
16 * the IsoTimer will determine the framerate of the resulting video. 16 * the IsoTimer will determine the framerate of the resulting video.
17 * 17 *
18 * 18 *
25 * 25 *
26 * @author Robert McIntyre 26 * @author Robert McIntyre
27 */ 27 */
28 public class HelloVideoRecording { 28 public class HelloVideoRecording {
29 29
30 public static void main(String[] ignore) throws IOException { 30 public static void main(String[] ignore) throws IOException {
31 Application app = new HelloLoop(); 31 Application app = new HelloLoop();
32 File video = File.createTempFile("JME-simple-video", ".avi"); 32 File video = File.createTempFile("JME-simple-video", ".avi");
33 app.setTimer(new IsoTimer(60)); 33 app.setTimer(new IsoTimer(60));
34 Capture.captureVideo(app, video); 34 Capture.captureVideo(app, video);
35 app.start(); 35 app.start();
36 System.out.println(video.getCanonicalPath()); 36 System.out.println(video.getCanonicalPath());
37 } 37 }
38 } 38 }