Mercurial > jmeCapture
view src/com/aurellem/capture/examples/Basic.java @ 63:df4a2d12ea13
added new timer for debugging purposes
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 15 Jan 2012 04:10:37 -0700 |
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 a15 * jMonkeyEngine application. You can use these techniques to make16 * high quality cutscenes or demo videos, even on very slow laptops.17 *18 * @author Robert McIntyre19 */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 }