Mercurial > jmeCapture
view src/com/aurellem/capture/examples/Basic.java @ 42:b1bc965a38d2
use reflection to set timer for MotionTrack for now
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 03 Nov 2011 18:47:21 -0700 |
parents | 5f616cc420dd |
children | 7184bc09a92e 3dc1f15e1e13 |
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 *15 * Demonstrates how to use basic Audio/Video capture with a jMonkeyEngine16 * application. You can use these techniques to make high quality cutscenes17 * or demo videos, even on very slow laptops.18 *19 * @author Robert McIntyre20 *21 */23 public class Basic {25 public static void main(String[] ignore) throws IOException{26 File video = File.createTempFile("JME-water-video", ".avi");27 File audio = File.createTempFile("JME-water-audio", ".wav");29 SimpleApplication app = new TestPostWater();30 app.setTimer(new IsoTimer(60));31 app.setShowSettings(false);33 Capture.captureVideo(app, video);34 Capture.captureAudio(app, audio);36 app.start();38 System.out.println(video.getCanonicalPath());39 System.out.println(audio.getCanonicalPath());40 }41 }