view src/com/aurellem/capture/examples/Basic.java @ 69:ddb300c5335f

fixed RatchetTimer time reporting.
author Robert McIntyre <rlm@mit.edu>
date Wed, 29 May 2013 17:15:41 -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.water.TestPostWater;
8 import com.aurellem.capture.Capture;
9 import com.aurellem.capture.IsoTimer;
10 import com.jme3.app.SimpleApplication;
13 /**
14 * Demonstrates how to use basic Audio/Video capture with a
15 * jMonkeyEngine application. You can use these techniques to make
16 * high quality cutscenes or demo videos, even on very slow laptops.
17 *
18 * @author Robert McIntyre
19 */
21 public class Basic {
23 public static void main(String[] ignore) throws IOException{
24 File video = File.createTempFile("JME-water-video", ".avi");
25 File audio = File.createTempFile("JME-water-audio", ".wav");
27 SimpleApplication app = new TestPostWater();
28 app.setTimer(new IsoTimer(60));
29 app.setShowSettings(false);
31 Capture.captureVideo(app, video);
32 Capture.captureAudio(app, audio);
34 app.start();
36 System.out.println(video.getCanonicalPath());
37 System.out.println(audio.getCanonicalPath());
38 }
39 }