view src/com/aurellem/capture/examples/Basic.java @ 51:6a1b28f060e6

interface documentation
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Dec 2011 13:42:30 -0600
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 jMonkeyEngine
16 * application. You can use these techniques to make high quality cutscenes
17 * or demo videos, even on very slow laptops.
18 *
19 * @author Robert McIntyre
20 *
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 }