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

improved formating
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Dec 2011 19:25:27 -0600
parents 3dc1f15e1e13
children
comparison
equal deleted inserted replaced
55:b05f629fc296 56:afc437f637bd
9 import com.aurellem.capture.IsoTimer; 9 import com.aurellem.capture.IsoTimer;
10 import com.jme3.app.SimpleApplication; 10 import com.jme3.app.SimpleApplication;
11 11
12 12
13 /** 13 /**
14 * 14 * Demonstrates how to use basic Audio/Video capture with a
15 * Demonstrates how to use basic Audio/Video capture with a jMonkeyEngine 15 * jMonkeyEngine application. You can use these techniques to make
16 * application. You can use these techniques to make high quality cutscenes 16 * high quality cutscenes or demo videos, even on very slow laptops.
17 * or demo videos, even on very slow laptops.
18 * 17 *
19 * @author Robert McIntyre 18 * @author Robert McIntyre
20 */ 19 */
21 20
22 public class Basic { 21 public class Basic {
23 22
24 public static void main(String[] ignore) throws IOException{ 23 public static void main(String[] ignore) throws IOException{
25 File video = File.createTempFile("JME-water-video", ".avi"); 24 File video = File.createTempFile("JME-water-video", ".avi");
26 File audio = File.createTempFile("JME-water-audio", ".wav"); 25 File audio = File.createTempFile("JME-water-audio", ".wav");
27 26
28 SimpleApplication app = new TestPostWater(); 27 SimpleApplication app = new TestPostWater();
29 app.setTimer(new IsoTimer(60)); 28 app.setTimer(new IsoTimer(60));
30 app.setShowSettings(false); 29 app.setShowSettings(false);
31 30
32 Capture.captureVideo(app, video); 31 Capture.captureVideo(app, video);
33 Capture.captureAudio(app, audio); 32 Capture.captureAudio(app, audio);
34 33
35 app.start(); 34 app.start();
36 35
37 System.out.println(video.getCanonicalPath()); 36 System.out.println(video.getCanonicalPath());
38 System.out.println(audio.getCanonicalPath()); 37 System.out.println(audio.getCanonicalPath());
39 } 38 }
40 } 39 }